@@ -264,14 +264,14 @@ namespace ix
264264        if  (!success)
265265        {
266266            auto  errorCode = args->cancel  ? HttpErrorCode::Cancelled : HttpErrorCode::CannotConnect;
267-             std::stringstream ss ;
268-             ss  << " Cannot connect to url: " "  / error : " 
267+             std::stringstream _ss ;
268+             _ss  << " Cannot connect to url: " "  / error : " 
269269            return  std::make_shared<HttpResponse>(code,
270270                                                  description,
271271                                                  errorCode,
272272                                                  headers,
273273                                                  payload,
274-                                                   ss .str (),
274+                                                   _ss .str (),
275275                                                  uploadSize,
276276                                                  downloadSize);
277277        }
@@ -281,27 +281,27 @@ namespace ix
281281
282282        if  (args->verbose )
283283        {
284-             std::stringstream ss ;
285-             ss  << " Sending " "  request " 
284+             std::stringstream _ss ;
285+             _ss  << " Sending " "  request " 
286286               << " to " " :" 
287287               << " request size: " size () << "  bytes" 
288288               << " =============" 
289289               << req << " =============" 
290290               << std::endl;
291291
292-             log (ss .str (), args);
292+             log (_ss .str (), args);
293293        }
294294
295295        if  (!_socket->writeBytes (req, isCancellationRequested))
296296        {
297297            auto  errorCode = args->cancel  ? HttpErrorCode::Cancelled : HttpErrorCode::SendError;
298-             std::string errorMsg (" Cannot send request" 
298+             std::string _errorMsg (" Cannot send request" 
299299            return  std::make_shared<HttpResponse>(code,
300300                                                  description,
301301                                                  errorCode,
302302                                                  headers,
303303                                                  payload,
304-                                                   errorMsg ,
304+                                                   _errorMsg ,
305305                                                  uploadSize,
306306                                                  downloadSize);
307307        }
@@ -315,33 +315,33 @@ namespace ix
315315        if  (!lineValid)
316316        {
317317            auto  errorCode = args->cancel  ? HttpErrorCode::Cancelled : HttpErrorCode::CannotReadStatusLine;
318-             std::string errorMsg (" Cannot retrieve status line" 
318+             std::string _errorMsg (" Cannot retrieve status line" 
319319            return  std::make_shared<HttpResponse>(code,
320320                                                  description,
321321                                                  errorCode,
322322                                                  headers,
323323                                                  payload,
324-                                                   errorMsg ,
324+                                                   _errorMsg ,
325325                                                  uploadSize,
326326                                                  downloadSize);
327327        }
328328
329329        if  (args->verbose )
330330        {
331-             std::stringstream ss ;
332-             ss  << " Status line " 
333-             log (ss .str (), args);
331+             std::stringstream _ss ;
332+             _ss  << " Status line " 
333+             log (_ss .str (), args);
334334        }
335335
336336        if  (sscanf (line.c_str (), " HTTP/1.1 %d" 1 )
337337        {
338-             std::string errorMsg (" Cannot parse response code from status line" 
338+             std::string _errorMsg (" Cannot parse response code from status line" 
339339            return  std::make_shared<HttpResponse>(code,
340340                                                  description,
341341                                                  HttpErrorCode::MissingStatus,
342342                                                  headers,
343343                                                  payload,
344-                                                   errorMsg ,
344+                                                   _errorMsg ,
345345                                                  uploadSize,
346346                                                  downloadSize);
347347        }
@@ -353,13 +353,13 @@ namespace ix
353353        if  (!headersValid)
354354        {
355355            auto  errorCode = args->cancel  ? HttpErrorCode::Cancelled : HttpErrorCode::HeaderParsingError;
356-             std::string errorMsg (" Cannot parse http headers" 
356+             std::string _errorMsg (" Cannot parse http headers" 
357357            return  std::make_shared<HttpResponse>(code,
358358                                                  description,
359359                                                  errorCode,
360360                                                  headers,
361361                                                  payload,
362-                                                   errorMsg ,
362+                                                   _errorMsg ,
363363                                                  uploadSize,
364364                                                  downloadSize);
365365        }
@@ -369,27 +369,27 @@ namespace ix
369369        {
370370            if  (headers.find (" Location" end ())
371371            {
372-                 std::string errorMsg (" Missing location header for redirect" 
372+                 std::string _errorMsg (" Missing location header for redirect" 
373373                return  std::make_shared<HttpResponse>(code,
374374                                                      description,
375375                                                      HttpErrorCode::MissingLocation,
376376                                                      headers,
377377                                                      payload,
378-                                                       errorMsg ,
378+                                                       _errorMsg ,
379379                                                      uploadSize,
380380                                                      downloadSize);
381381            }
382382
383383            if  (redirects >= args->maxRedirects )
384384            {
385-                 std::stringstream ss ;
386-                 ss  << " Too many redirects: " 
385+                 std::stringstream _ss ;
386+                 _ss  << " Too many redirects: " 
387387                return  std::make_shared<HttpResponse>(code,
388388                                                      description,
389389                                                      HttpErrorCode::TooManyRedirects,
390390                                                      headers,
391391                                                      payload,
392-                                                       ss .str (),
392+                                                       _ss .str (),
393393                                                      uploadSize,
394394                                                      downloadSize);
395395            }
@@ -446,7 +446,7 @@ namespace ix
446446        else  if  (headers.find (" Transfer-Encoding" end () &&
447447                 headers[" Transfer-Encoding" " chunked" 
448448        {
449-             std::stringstream ss ;
449+             std::stringstream _ss ;
450450
451451            while  (true )
452452            {
@@ -467,9 +467,9 @@ namespace ix
467467                }
468468
469469                uint64_t  chunkSize;
470-                 ss .str (" " 
471-                 ss  << std::hex << line;
472-                 ss  >> chunkSize;
470+                 _ss .str (" " 
471+                 _ss  << std::hex << line;
472+                 _ss  >> chunkSize;
473473
474474                if  (args->verbose )
475475                {
@@ -485,11 +485,11 @@ namespace ix
485485                                                      isCancellationRequested);
486486                if  (!chunkResult.first )
487487                {
488-                     auto  errorCode  = args->cancel  ? HttpErrorCode::Cancelled : HttpErrorCode::ChunkReadError;
488+                     auto  _errorCode  = args->cancel  ? HttpErrorCode::Cancelled : HttpErrorCode::ChunkReadError;
489489                    errorMsg = " Cannot read chunk" 
490490                    return  std::make_shared<HttpResponse>(code,
491491                                                          description,
492-                                                           errorCode ,
492+                                                           _errorCode ,
493493                                                          headers,
494494                                                          payload,
495495                                                          errorMsg,
@@ -508,10 +508,10 @@ namespace ix
508508
509509                if  (!lineResult.first )
510510                {
511-                     auto  errorCode  = args->cancel  ? HttpErrorCode::Cancelled : HttpErrorCode::ChunkReadError;
511+                     auto  _errorCode  = args->cancel  ? HttpErrorCode::Cancelled : HttpErrorCode::ChunkReadError;
512512                    return  std::make_shared<HttpResponse>(code,
513513                                                          description,
514-                                                           errorCode ,
514+                                                           _errorCode ,
515515                                                          headers,
516516                                                          payload,
517517                                                          errorMsg,
@@ -528,13 +528,13 @@ namespace ix
528528        }
529529        else 
530530        {
531-             std::string errorMsg (" Cannot read http body" 
531+             std::string _errorMsg (" Cannot read http body" 
532532            return  std::make_shared<HttpResponse>(code,
533533                                                  description,
534534                                                  HttpErrorCode::CannotReadBody,
535535                                                  headers,
536536                                                  payload,
537-                                                   errorMsg ,
537+                                                   _errorMsg ,
538538                                                  uploadSize,
539539                                                  downloadSize);
540540        }
@@ -548,25 +548,25 @@ namespace ix
548548            std::string decompressedPayload;
549549            if  (!gzipDecompress (payload, decompressedPayload))
550550            {
551-                 std::string errorMsg (" Error decompressing payload" 
551+                 std::string _errorMsg (" Error decompressing payload" 
552552                return  std::make_shared<HttpResponse>(code,
553553                                                      description,
554554                                                      HttpErrorCode::Gzip,
555555                                                      headers,
556556                                                      payload,
557-                                                       errorMsg ,
557+                                                       _errorMsg ,
558558                                                      uploadSize,
559559                                                      downloadSize);
560560            }
561561            payload = decompressedPayload;
562562#else 
563-             std::string errorMsg (" ixwebsocket was not compiled with gzip support on" 
563+             std::string _errorMsg (" ixwebsocket was not compiled with gzip support on" 
564564            return  std::make_shared<HttpResponse>(code,
565565                                                  description,
566566                                                  HttpErrorCode::Gzip,
567567                                                  headers,
568568                                                  payload,
569-                                                   errorMsg ,
569+                                                   _errorMsg ,
570570                                                  uploadSize,
571571                                                  downloadSize);
572572#endif 
0 commit comments