wininet: Rearrange invalid header checks.
This commit is contained in:
parent
5caf809426
commit
59a217847c
|
@ -4235,13 +4235,11 @@ static INT HTTP_GetResponseHeaders(LPWININETHTTPREQW lpwhr, BOOL clear)
|
|||
TRACE("got line %s, now interpreting\n", debugstr_a(bufferA));
|
||||
|
||||
if (!bufferA[0]) break;
|
||||
if (!strchr(bufferA, ':'))
|
||||
{
|
||||
WARN("invalid header\n");
|
||||
continue;
|
||||
}
|
||||
MultiByteToWideChar( CP_ACP, 0, bufferA, buflen, buffer, MAX_REPLY_LEN );
|
||||
|
||||
pFieldAndValue = HTTP_InterpretHttpHeader(buffer);
|
||||
if (pFieldAndValue)
|
||||
{
|
||||
while (cchRawHeaders + buflen + strlenW(szCrLf) > cchMaxRawHeaders)
|
||||
cchMaxRawHeaders *= 2;
|
||||
temp = HeapReAlloc(GetProcessHeap(), 0, lpszRawHeaders, (cchMaxRawHeaders+1)*sizeof(WCHAR));
|
||||
|
@ -4253,15 +4251,12 @@ static INT HTTP_GetResponseHeaders(LPWININETHTTPREQW lpwhr, BOOL clear)
|
|||
cchRawHeaders += sizeof(szCrLf)/sizeof(szCrLf[0])-1;
|
||||
lpszRawHeaders[cchRawHeaders] = '\0';
|
||||
|
||||
pFieldAndValue = HTTP_InterpretHttpHeader(buffer);
|
||||
if (!pFieldAndValue)
|
||||
break;
|
||||
|
||||
HTTP_ProcessHeader(lpwhr, pFieldAndValue[0], pFieldAndValue[1],
|
||||
HTTP_ADDREQ_FLAG_ADD );
|
||||
|
||||
HTTP_FreeTokens(pFieldAndValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cbreaks++;
|
||||
|
|
Loading…
Reference in New Issue