]> granicus.if.org Git - curl/commitdiff
allow the end-of-headers from a proxy response to CONNECT end with a CRCR
authorDaniel Stenberg <daniel@haxx.se>
Mon, 24 Nov 2003 16:17:55 +0000 (16:17 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 24 Nov 2003 16:17:55 +0000 (16:17 +0000)
as well as a CRLF

lib/http.c

index 0b36f1eea578908859ec34be77bd9ed92299527f..d5c8cf6043ac6fe96f5bab8c228b29f0e9813ac5 100644 (file)
@@ -849,9 +849,11 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn,
             if(*ptr=='\n') {
               char letter;
               /* Newlines are CRLF, so the CR is ignored as the line isn't
-                 really terminated until the LF comes */
+                 really terminated until the LF comes. Treat a following CR
+                 as end-of-headers as well.*/
 
-              if('\r' == line_start[0]) {
+              if(('\r' == line_start[0]) ||
+                 ('\n' == line_start[0])) {
                 /* end of response-headers from the proxy */
                 keepon=FALSE;
                 break; /* breaks out of for-loop, not switch() */