Module: wine Branch: master Commit: cf43b160363f25fc53a25594c0c44151c9a49af9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=cf43b160363f25fc53a25594c0...
Author: Rob Shearman rob@codeweavers.com Date: Thu Jan 4 18:21:34 2007 +0000
wininet: Always send a Connection header set to "close" because that is what we expect for the moment.
---
dlls/wininet/http.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index c18e45e..336f1fb 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -2227,6 +2227,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWINI INT responseLen; BOOL loop_next; INTERNET_ASYNC_RESULT iar; + static const WCHAR szClose[] = { 'C','l','o','s','e',0 };
TRACE("--> %p\n", lpwhr);
@@ -2270,6 +2271,9 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWINI HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REPLACE); }
+ HTTP_ProcessHeader(lpwhr, szConnection, szClose, + HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE); + /* if there's a proxy username and password, add it to the headers */ HTTP_AddProxyInfo(lpwhr);
@@ -2786,17 +2790,10 @@ static BOOL HTTP_ProcessHeader(LPWININET LPHTTPHEADERW lphttpHdr = NULL; BOOL bSuccess = FALSE; INT index = -1; - static const WCHAR szConnection[] = { 'C','o','n','n','e','c','t','i','o','n',0 }; BOOL request_only = dwModifier & HTTP_ADDHDR_FLAG_REQ;
TRACE("--> %s: %s - 0x%08x\n", debugstr_w(field), debugstr_w(value), dwModifier);
- /* Don't let applications add Connection header to request */ - if (strcmpW(szConnection,field)==0 && (dwModifier & HTTP_ADDHDR_FLAG_REQ)) - { - return FALSE; - } - /* REPLACE wins out over ADD */ if (dwModifier & HTTP_ADDHDR_FLAG_REPLACE) dwModifier &= ~HTTP_ADDHDR_FLAG_ADD;