Commit 890977a1 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

Always replace whatever is already in the HTTP "Host" header.

parent 4949a717
...@@ -747,10 +747,10 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, ...@@ -747,10 +747,10 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
InternetCrackUrlW(lpszReferrer, 0, 0, &UrlComponents); InternetCrackUrlW(lpszReferrer, 0, 0, &UrlComponents);
if (strlenW(UrlComponents.lpszHostName)) if (strlenW(UrlComponents.lpszHostName))
HTTP_ProcessHeader(lpwhr, g_szHost, UrlComponents.lpszHostName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); HTTP_ProcessHeader(lpwhr, g_szHost, UrlComponents.lpszHostName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDHDR_FLAG_REQ);
} }
else else
HTTP_ProcessHeader(lpwhr, g_szHost, lpwhs->lpszServerName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); HTTP_ProcessHeader(lpwhr, g_szHost, lpwhs->lpszServerName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDHDR_FLAG_REQ);
if (NULL != hIC->lpszProxy && hIC->lpszProxy[0] != 0) if (NULL != hIC->lpszProxy && hIC->lpszProxy[0] != 0)
HTTP_DealWithProxy( hIC, lpwhs, lpwhr ); HTTP_DealWithProxy( hIC, lpwhs, lpwhr );
...@@ -1375,7 +1375,7 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl, LPCWST ...@@ -1375,7 +1375,7 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl, LPCWST
lpwhs->lpszUserName = WININET_strdupW(userName); lpwhs->lpszUserName = WININET_strdupW(userName);
lpwhs->nServerPort = urlComponents.nPort; lpwhs->nServerPort = urlComponents.nPort;
HTTP_ProcessHeader(lpwhr, g_szHost, hostName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); HTTP_ProcessHeader(lpwhr, g_szHost, hostName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDHDR_FLAG_REQ);
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_RESOLVING_NAME, INTERNET_STATUS_RESOLVING_NAME,
......
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