WININET: allow http redirects to work again
Robert Shearman
rob at codeweavers.com
Sat Sep 18 06:52:54 CDT 2004
Mike McCormack wrote:
>
> The following patch broke http redirects.
>
> http://cvs.winehq.org/cvsweb/wine/dlls/wininet/http.c.diff?r1=1.81&r2=1.82
>
>
> This fixes them again.
This is a better patch. Sorry I forgot to include it in my wininet patch
series.
Rob
Changelog:
Always replace whatever is already in the HTTP "Host" header.
-------------- next part --------------
diff -u -N -r -x '*~' -x '.#*' -x CVS -x Makefile -x '*.o' -x '*.orig' -x '*.diff' -x '*.rej' -x '*.spec.c' wine/dlls/wininet_1/http.c wine/dlls/wininet/http.c
--- wine/dlls/wininet_1/http.c 2004-09-18 12:47:59.267461712 +0100
+++ wine/dlls/wininet/http.c 2004-09-18 12:48:48.553969024 +0100
@@ -747,10 +747,10 @@
InternetCrackUrlW(lpszReferrer, 0, 0, &UrlComponents);
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
- 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)
HTTP_DealWithProxy( hIC, lpwhs, lpwhr );
@@ -1375,7 +1375,7 @@
lpwhs->lpszUserName = WININET_strdupW(userName);
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,
INTERNET_STATUS_RESOLVING_NAME,
More information about the wine-patches
mailing list