Commit 4cd38b48 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

Accept headers without \r\n ending in HttpAddRequestHeaders.

parent 81e6f0c1
......@@ -122,16 +122,19 @@ static BOOL WINAPI HTTP_HttpAddRequestHeadersW(LPWININETHTTPREQW lpwhr,
lpszEnd++;
}
if (*lpszEnd == '\0')
if (*lpszStart == '\0')
break;
*lpszEnd = '\0';
if (*lpszEnd == '\r')
{
*lpszEnd = '\0';
lpszEnd += 2; /* Jump over \r\n */
}
TRACE("interpreting header %s\n", debugstr_w(lpszStart));
if (HTTP_InterpretHttpHeader(lpszStart, field, MAX_FIELD_LEN, value, MAX_FIELD_VALUE_LEN))
bSuccess = HTTP_ProcessHeader(lpwhr, field, value, dwModifier | HTTP_ADDHDR_FLAG_REQ);
lpszStart = lpszEnd + 2; /* Jump over \0\n */
lpszStart = lpszEnd;
} while (bSuccess);
......
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