Commit fd5b97bc authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

wininet: Always respect Proxy-Connection: or Connection: if it exists.

parent 11f09f3a
...@@ -4048,7 +4048,9 @@ static BOOL HTTP_ProcessHeader(LPWININETHTTPREQW lpwhr, LPCWSTR field, LPCWSTR v ...@@ -4048,7 +4048,9 @@ static BOOL HTTP_ProcessHeader(LPWININETHTTPREQW lpwhr, LPCWSTR field, LPCWSTR v
BOOL HTTP_FinishedReading(LPWININETHTTPREQW lpwhr) BOOL HTTP_FinishedReading(LPWININETHTTPREQW lpwhr)
{ {
WCHAR szVersion[10]; WCHAR szVersion[10];
WCHAR szConnectionResponse[20];
DWORD dwBufferSize = sizeof(szVersion); DWORD dwBufferSize = sizeof(szVersion);
BOOL keepalive = FALSE;
TRACE("\n"); TRACE("\n");
...@@ -4058,15 +4060,19 @@ BOOL HTTP_FinishedReading(LPWININETHTTPREQW lpwhr) ...@@ -4058,15 +4060,19 @@ BOOL HTTP_FinishedReading(LPWININETHTTPREQW lpwhr)
&dwBufferSize, NULL) || &dwBufferSize, NULL) ||
strcmpiW(szVersion, g_szHttp1_1)) strcmpiW(szVersion, g_szHttp1_1))
{ {
WCHAR szConnectionResponse[20]; keepalive = TRUE;
dwBufferSize = sizeof(szConnectionResponse); }
if ((!HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) ||
strcmpiW(szConnectionResponse, szKeepAlive)) && dwBufferSize = sizeof(szConnectionResponse);
(!HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_PROXY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) || if (HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_PROXY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) ||
strcmpiW(szConnectionResponse, szKeepAlive))) HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL))
{ {
HTTPREQ_CloseConnection(&lpwhr->hdr); keepalive = !strcmpiW(szConnectionResponse, szKeepAlive);
} }
if (!keepalive)
{
HTTPREQ_CloseConnection(&lpwhr->hdr);
} }
/* FIXME: store data in the URL cache here */ /* FIXME: store data in the URL cache here */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment