Hans Leidekker : wininet: Don' t strip Accept-Encoding headers from version 1.1 requests.
Alexandre Julliard
julliard at winehq.org
Tue Mar 25 06:57:59 CDT 2008
Module: wine
Branch: master
Commit: 3a57711bb84187a13249e107604cfa23c721d851
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3a57711bb84187a13249e107604cfa23c721d851
Author: Hans Leidekker <hans at it.vu.nl>
Date: Mon Mar 24 21:31:53 2008 +0100
wininet: Don't strip Accept-Encoding headers from version 1.1 requests.
---
dlls/wininet/http.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index d02217a..2d16924 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;
}
/***********************************************************************
More information about the wine-cvs
mailing list