From 3a57711bb84187a13249e107604cfa23c721d851 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Mon, 24 Mar 2008 21:31:53 +0100 Subject: [PATCH] wininet: Don't strip Accept-Encoding headers from version 1.1 requests. --- dlls/wininet/http.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index d02217a22c3..2d169241736 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -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; } /***********************************************************************