Vincent Povirk : wininet: Always respect Proxy-Connection: or Connection: if it exists.
Alexandre Julliard
julliard at winehq.org
Thu Jul 17 06:37:43 CDT 2008
Module: wine
Branch: master
Commit: fd5b97bc4d12adc69085b739061c56e9107f8d1f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fd5b97bc4d12adc69085b739061c56e9107f8d1f
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Thu Jul 10 10:42:54 2008 -0500
wininet: Always respect Proxy-Connection: or Connection: if it exists.
---
dlls/wininet/http.c | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 7607721..38023a8 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -4048,7 +4048,9 @@ static BOOL HTTP_ProcessHeader(LPWININETHTTPREQW lpwhr, LPCWSTR field, LPCWSTR v
BOOL HTTP_FinishedReading(LPWININETHTTPREQW lpwhr)
{
WCHAR szVersion[10];
+ WCHAR szConnectionResponse[20];
DWORD dwBufferSize = sizeof(szVersion);
+ BOOL keepalive = FALSE;
TRACE("\n");
@@ -4058,15 +4060,19 @@ BOOL HTTP_FinishedReading(LPWININETHTTPREQW lpwhr)
&dwBufferSize, NULL) ||
strcmpiW(szVersion, g_szHttp1_1))
{
- WCHAR szConnectionResponse[20];
- dwBufferSize = sizeof(szConnectionResponse);
- if ((!HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) ||
- strcmpiW(szConnectionResponse, szKeepAlive)) &&
- (!HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_PROXY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) ||
- strcmpiW(szConnectionResponse, szKeepAlive)))
- {
- HTTPREQ_CloseConnection(&lpwhr->hdr);
- }
+ keepalive = TRUE;
+ }
+
+ dwBufferSize = sizeof(szConnectionResponse);
+ if (HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_PROXY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) ||
+ HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL))
+ {
+ keepalive = !strcmpiW(szConnectionResponse, szKeepAlive);
+ }
+
+ if (!keepalive)
+ {
+ HTTPREQ_CloseConnection(&lpwhr->hdr);
}
/* FIXME: store data in the URL cache here */
More information about the wine-cvs
mailing list