Commit 6c767c4e authored by Mike Kaplinskiy's avatar Mike Kaplinskiy Committed by Alexandre Julliard

wininet: Make \r and \n valid header separators.

parent dcf4a990
...@@ -741,7 +741,7 @@ static BOOL HTTP_HttpAddRequestHeadersW(LPWININETHTTPREQW lpwhr, ...@@ -741,7 +741,7 @@ static BOOL HTTP_HttpAddRequestHeadersW(LPWININETHTTPREQW lpwhr,
while (*lpszEnd != '\0') while (*lpszEnd != '\0')
{ {
if (*lpszEnd == '\r' && *(lpszEnd + 1) == '\n') if (*lpszEnd == '\r' || *lpszEnd == '\n')
break; break;
lpszEnd++; lpszEnd++;
} }
...@@ -749,10 +749,10 @@ static BOOL HTTP_HttpAddRequestHeadersW(LPWININETHTTPREQW lpwhr, ...@@ -749,10 +749,10 @@ static BOOL HTTP_HttpAddRequestHeadersW(LPWININETHTTPREQW lpwhr,
if (*lpszStart == '\0') if (*lpszStart == '\0')
break; break;
if (*lpszEnd == '\r') if (*lpszEnd == '\r' || *lpszEnd == '\n')
{ {
*lpszEnd = '\0'; *lpszEnd = '\0';
lpszEnd += 2; /* Jump over \r\n */ lpszEnd++; /* Jump over newline */
} }
TRACE("interpreting header %s\n", debugstr_w(lpszStart)); TRACE("interpreting header %s\n", debugstr_w(lpszStart));
if (*lpszStart == '\0') if (*lpszStart == '\0')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment