Jacek Caban : wininet: Use stored server name in HTTP_InsertCookies.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 14 14:52:31 CDT 2014


Module: wine
Branch: master
Commit: ffec675b4f1dfdadda6635f2a819b126ac00338c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ffec675b4f1dfdadda6635f2a819b126ac00338c

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Jul 14 15:21:11 2014 +0200

wininet: Use stored server name in HTTP_InsertCookies.

---

 dlls/wininet/http.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index ffd31e6..8ff42a2 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -4177,16 +4177,11 @@ static LPWSTR HTTP_build_req( LPCWSTR *list, int len )
 static void HTTP_InsertCookies(http_request_t *request)
 {
     DWORD cookie_size, size, cnt = 0;
-    HTTPHEADERW *host;
     WCHAR *cookies;
 
     static const WCHAR cookieW[] = {'C','o','o','k','i','e',':',' ',0};
 
-    host = HTTP_GetHeader(request, hostW);
-    if(!host)
-        return;
-
-    if(get_cookie(host->lpszValue, request->path, NULL, &cookie_size, INTERNET_COOKIE_HTTPONLY) != ERROR_SUCCESS)
+    if(get_cookie(request->server->name, request->path, NULL, &cookie_size, INTERNET_COOKIE_HTTPONLY) != ERROR_SUCCESS)
         return;
 
     size = sizeof(cookieW) + cookie_size * sizeof(WCHAR) + sizeof(szCrLf);
@@ -4194,7 +4189,7 @@ static void HTTP_InsertCookies(http_request_t *request)
         return;
 
     cnt += sprintfW(cookies, cookieW);
-    get_cookie(host->lpszValue, request->path, cookies+cnt, &cookie_size, INTERNET_COOKIE_HTTPONLY);
+    get_cookie(request->server->name, request->path, cookies+cnt, &cookie_size, INTERNET_COOKIE_HTTPONLY);
     strcatW(cookies, szCrLf);
 
     HTTP_HttpAddRequestHeadersW(request, cookies, strlenW(cookies), HTTP_ADDREQ_FLAG_REPLACE);




More information about the wine-cvs mailing list