wine-staging/patches/wininet-Cleanup/0005-wininet-Use-request-server-name-when-processing-cook.patch

46 lines
1.4 KiB
Diff
Raw Normal View History

From 73deec220b498f3a3ac6bf0674b9e0550f0aebdc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 16 May 2015 01:34:22 +0200
Subject: wininet: Use request->server->name when processing cookies instead of
Host header field.
---
dlls/wininet/http.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index cd2cdcf..51ca427 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -765,7 +765,6 @@ static void HTTP_ProcessCookies( http_request_t *request )
while((HeaderIndex = HTTP_GetCustomHeaderIndex(request, szSet_Cookie, numCookies++, FALSE)) != -1)
{
- HTTPHEADERW *host;
const WCHAR *data;
WCHAR *name;
@@ -774,10 +773,6 @@ static void HTTP_ProcessCookies( http_request_t *request )
if (!setCookieHeader->lpszValue)
continue;
- host = HTTP_GetHeader(request, hostW);
- if(!host)
- continue;
-
data = strchrW(setCookieHeader->lpszValue, '=');
if(!data)
continue;
@@ -787,7 +782,7 @@ static void HTTP_ProcessCookies( http_request_t *request )
continue;
data++;
- set_cookie(host->lpszValue, request->path, name, data, INTERNET_COOKIE_HTTPONLY);
+ set_cookie(request->server->name, request->path, name, data, INTERNET_COOKIE_HTTPONLY);
heap_free(name);
}
--
2.4.0