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

46 lines
1.4 KiB
Diff
Raw Normal View History

From d3936900b7650ff24b116c48457861ea3b78eef4 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 45183cf..3539dc8 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