wininet: Don't strip Accept-Encoding headers from version 1.1 requests.

oldstable
Hans Leidekker 2008-03-24 21:31:53 +01:00 committed by Alexandre Julliard
parent 404a51b455
commit 3a57711bb8
1 changed files with 3 additions and 4 deletions

View File

@ -63,6 +63,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
static const WCHAR g_szHttp1_0[] = {'H','T','T','P','/','1','.','0',0};
static const WCHAR g_szHttp1_1[] = {'H','T','T','P','/','1','.','1',0};
static const WCHAR g_szReferer[] = {'R','e','f','e','r','e','r',0};
static const WCHAR g_szAccept[] = {'A','c','c','e','p','t',0};
@ -3997,13 +3998,11 @@ static BOOL HTTP_DeleteCustomHeader(LPWININETHTTPREQW lpwhr, DWORD index)
*/
static BOOL HTTP_VerifyValidHeader(LPWININETHTTPREQW lpwhr, LPCWSTR field)
{
BOOL rc = TRUE;
/* Accept-Encoding is stripped from HTTP/1.0 requests. It is invalid */
if (strcmpiW(field,szAccept_Encoding)==0)
if (!strcmpW(lpwhr->lpszVersion, g_szHttp1_0) && !strcmpiW(field, szAccept_Encoding))
return FALSE;
return rc;
return TRUE;
}
/***********************************************************************