You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase against efd41e4f2b1c784d4939aa10d869f87f2384f10c.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 258182e1105befbf3ee6b6a388c07d1a84632fee Mon Sep 17 00:00:00 2001
|
||||
From 58d5370c1a1a1e0ee44742440ebf7abcd19c148c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 15 May 2015 20:37:19 +0200
|
||||
Subject: wininet/tests: Add more tests for cookies.
|
||||
@@ -8,10 +8,10 @@ Subject: wininet/tests: Add more tests for cookies.
|
||||
1 file changed, 89 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
|
||||
index 3b2f9a5..bbfdaf0 100644
|
||||
index b841795..559ab3e 100644
|
||||
--- a/dlls/wininet/tests/http.c
|
||||
+++ b/dlls/wininet/tests/http.c
|
||||
@@ -1974,6 +1974,14 @@ static const char okmsg2[] =
|
||||
@@ -1990,6 +1990,14 @@ static const char okmsg2[] =
|
||||
"Set-Cookie: two\r\n"
|
||||
"\r\n";
|
||||
|
||||
@@ -26,7 +26,7 @@ index 3b2f9a5..bbfdaf0 100644
|
||||
static const char notokmsg[] =
|
||||
"HTTP/1.1 400 Bad Request\r\n"
|
||||
"Server: winetest\r\n"
|
||||
@@ -2335,6 +2343,32 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
@@ -2353,6 +2361,32 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
else
|
||||
send(c, notokmsg, sizeof notokmsg-1, 0);
|
||||
}
|
||||
@@ -56,10 +56,10 @@ index 3b2f9a5..bbfdaf0 100644
|
||||
+ else
|
||||
+ send(c, notokmsg, sizeof notokmsg-1, 0);
|
||||
+ }
|
||||
shutdown(c, 2);
|
||||
closesocket(c);
|
||||
c = -1;
|
||||
@@ -3545,7 +3579,7 @@ static void test_cookie_header(int port)
|
||||
if (strstr(buffer, "/test_host_override"))
|
||||
{
|
||||
if (strstr(buffer, host_header_override))
|
||||
@@ -3669,7 +3703,7 @@ static void test_cookie_header(int port)
|
||||
HINTERNET ses, con, req;
|
||||
DWORD size, error;
|
||||
BOOL ret;
|
||||
@@ -68,7 +68,7 @@ index 3b2f9a5..bbfdaf0 100644
|
||||
|
||||
ses = InternetOpenA("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
|
||||
ok(ses != NULL, "InternetOpen failed\n");
|
||||
@@ -3573,7 +3607,7 @@ static void test_cookie_header(int port)
|
||||
@@ -3697,7 +3731,7 @@ static void test_cookie_header(int port)
|
||||
size = sizeof(buffer);
|
||||
ret = HttpQueryInfoA(req, HTTP_QUERY_COOKIE | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, NULL);
|
||||
ok(ret, "HttpQueryInfo failed: %u\n", GetLastError());
|
||||
@@ -77,15 +77,15 @@ index 3b2f9a5..bbfdaf0 100644
|
||||
|
||||
ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
ok(ret, "HttpSendRequest failed: %u\n", GetLastError());
|
||||
@@ -3584,9 +3618,61 @@ static void test_cookie_header(int port)
|
||||
@@ -3708,9 +3742,61 @@ static void test_cookie_header(int port)
|
||||
size = sizeof(buffer);
|
||||
ret = HttpQueryInfoA(req, HTTP_QUERY_COOKIE | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, NULL);
|
||||
ok(ret, "HttpQueryInfo failed: %u\n", GetLastError());
|
||||
- ok(!strcmp(buffer, "cookie=biscuit"), "got '%s' expected \'cookie=biscuit\'\n", buffer);
|
||||
+ ok(!strstr(buffer, "cookie=not biscuit"), "'%s' should not contain \'cookie=not biscuit\'\n", buffer);
|
||||
+ ok(!!strstr(buffer, "cookie=biscuit"), "'%s' should contain \'cookie=biscuit\'\n", buffer);
|
||||
|
||||
InternetCloseHandle(req);
|
||||
+
|
||||
+ InternetCloseHandle(req);
|
||||
+
|
||||
+ InternetSetCookieA("http://localhost/testCCCC", "subcookie", "data");
|
||||
+
|
||||
@@ -118,12 +118,12 @@ index 3b2f9a5..bbfdaf0 100644
|
||||
+
|
||||
+ req = HttpOpenRequestA(con, NULL, "/test_cookie_path2", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
|
||||
+ ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
+ ok(ret, "HttpSendRequest failed\n");
|
||||
+
|
||||
+ test_status_code(req, 400);
|
||||
+ InternetCloseHandle(req);
|
||||
InternetCloseHandle(req);
|
||||
+
|
||||
+ req = HttpOpenRequestA(con, NULL, "/test_cookie_merge", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
@@ -141,5 +141,5 @@ index 3b2f9a5..bbfdaf0 100644
|
||||
InternetCloseHandle(ses);
|
||||
}
|
||||
--
|
||||
2.4.0
|
||||
2.4.3
|
||||
|
||||
|
@@ -1,160 +0,0 @@
|
||||
From 0f294422ff9d63808689d47eddb20945d74d2349 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 15 May 2015 21:07:19 +0200
|
||||
Subject: wininet/tests: Add tests for overriding host header.
|
||||
|
||||
---
|
||||
dlls/wininet/tests/http.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 109 insertions(+)
|
||||
|
||||
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
|
||||
index bbfdaf0..94f4ae9 100644
|
||||
--- a/dlls/wininet/tests/http.c
|
||||
+++ b/dlls/wininet/tests/http.c
|
||||
@@ -2043,6 +2043,7 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
WSADATA wsaData;
|
||||
int last_request = 0;
|
||||
char host_header[22];
|
||||
+ char host_header_override[30];
|
||||
static BOOL test_b = FALSE;
|
||||
static int test_no_cache = 0;
|
||||
|
||||
@@ -2069,6 +2070,7 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
SetEvent(si->hEvent);
|
||||
|
||||
sprintf(host_header, "Host: localhost:%d", si->port);
|
||||
+ sprintf(host_header_override, "Host: test.local:%d\r\n", si->port);
|
||||
|
||||
do
|
||||
{
|
||||
@@ -2369,6 +2371,13 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
else
|
||||
send(c, notokmsg, sizeof notokmsg-1, 0);
|
||||
}
|
||||
+ if (strstr(buffer, "/test_host_override"))
|
||||
+ {
|
||||
+ if (strstr(buffer, host_header_override))
|
||||
+ send(c, okmsg, sizeof okmsg-1, 0);
|
||||
+ else
|
||||
+ send(c, notokmsg, sizeof notokmsg-1, 0);
|
||||
+ }
|
||||
shutdown(c, 2);
|
||||
closesocket(c);
|
||||
c = -1;
|
||||
@@ -2964,6 +2973,105 @@ static void test_connection_header(int port)
|
||||
InternetCloseHandle(ses);
|
||||
}
|
||||
|
||||
+static void test_header_override(int port)
|
||||
+{
|
||||
+ char buffer[128], host_header_override[30], full_url[128];
|
||||
+ HINTERNET ses, con, req;
|
||||
+ DWORD size, count, err;
|
||||
+ BOOL ret;
|
||||
+
|
||||
+ sprintf(host_header_override, "Host: test.local:%d\r\n", port);
|
||||
+ sprintf(full_url, "http://localhost:%d/test_host_override", port);
|
||||
+
|
||||
+ ses = InternetOpenA("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
|
||||
+ ok(ses != NULL, "InternetOpen failed\n");
|
||||
+
|
||||
+ con = InternetConnectA(ses, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0);
|
||||
+ ok(con != NULL, "InternetConnect failed\n");
|
||||
+
|
||||
+ req = HttpOpenRequestA(con, NULL, "/test_host_override", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
+ memset(buffer, 0, sizeof(buffer));
|
||||
+ size = sizeof(buffer)-1;
|
||||
+ count = 0;
|
||||
+ ret = HttpQueryInfoA(req, HTTP_QUERY_HOST | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, &count);
|
||||
+ err = GetLastError();
|
||||
+ todo_wine ok(!ret, "HttpQueryInfo succeeded\n");
|
||||
+ todo_wine ok(err == ERROR_HTTP_HEADER_NOT_FOUND, "Expected error ERROR_HTTP_HEADER_NOT_FOUND, got %d\n", err);
|
||||
+
|
||||
+ memset(buffer, 0, sizeof(buffer));
|
||||
+ size = sizeof(buffer)-1;
|
||||
+ ret = InternetQueryOptionA(req, INTERNET_OPTION_URL, buffer, &size);
|
||||
+ ok(ret, "InternetQueryOption failed\n");
|
||||
+ ok(!strcmp(full_url, buffer), "Expected %s, got %s\n", full_url, buffer);
|
||||
+
|
||||
+ ret = HttpAddRequestHeadersA(req, host_header_override, ~0u, HTTP_ADDREQ_FLAG_COALESCE);
|
||||
+ ok(ret, "HttpAddRequestHeaders failed\n");
|
||||
+
|
||||
+ memset(buffer, 0, sizeof(buffer));
|
||||
+ size = sizeof(buffer)-1;
|
||||
+ count = 0;
|
||||
+ ret = HttpQueryInfoA(req, HTTP_QUERY_HOST | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, &count);
|
||||
+ ok(ret, "HttpQueryInfo failed\n");
|
||||
+
|
||||
+ memset(buffer, 0, sizeof(buffer));
|
||||
+ size = sizeof(buffer)-1;
|
||||
+ ret = InternetQueryOptionA(req, INTERNET_OPTION_URL, buffer, &size);
|
||||
+ ok(ret, "InternetQueryOption failed\n");
|
||||
+ todo_wine ok(!strcmp(full_url, buffer), "Expected %s, got %s\n", full_url, buffer);
|
||||
+
|
||||
+ ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
+ ok(ret, "HttpSendRequest failed\n");
|
||||
+
|
||||
+ test_status_code_todo(req, 200);
|
||||
+ InternetCloseHandle(req);
|
||||
+
|
||||
+ req = HttpOpenRequestA(con, NULL, "/test_host_override", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
+ ret = HttpAddRequestHeadersA(req, host_header_override, ~0u, HTTP_ADDREQ_FLAG_COALESCE);
|
||||
+ ok(ret, "HttpAddRequestHeaders failed\n");
|
||||
+
|
||||
+ ret = HttpAddRequestHeadersA(req, host_header_override, ~0u, HTTP_ADDREQ_FLAG_COALESCE);
|
||||
+ ok(ret, "HttpAddRequestHeaders failed\n");
|
||||
+
|
||||
+ ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
+ ok(ret, "HttpSendRequest failed\n");
|
||||
+
|
||||
+ test_status_code(req, 400);
|
||||
+ InternetCloseHandle(req);
|
||||
+
|
||||
+ req = HttpOpenRequestA(con, NULL, "/test_host_override", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
+ ret = HttpAddRequestHeadersA(req, host_header_override, ~0u, HTTP_ADDREQ_FLAG_ADD);
|
||||
+ ok(ret, "HttpAddRequestHeaders failed\n");
|
||||
+
|
||||
+ ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
+ ok(ret, "HttpSendRequest failed\n");
|
||||
+
|
||||
+ test_status_code(req, 200);
|
||||
+ InternetCloseHandle(req);
|
||||
+
|
||||
+ req = HttpOpenRequestA(con, NULL, "/test_host_override", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
+ ret = HttpAddRequestHeadersA(req, host_header_override, ~0u, HTTP_ADDREQ_FLAG_REPLACE);
|
||||
+ err = GetLastError();
|
||||
+ todo_wine ok(!ret, "HttpAddRequestHeaders succeeded\n");
|
||||
+ todo_wine ok(err == ERROR_HTTP_HEADER_NOT_FOUND, "Expected error ERROR_HTTP_HEADER_NOT_FOUND, got %d\n", err);
|
||||
+
|
||||
+ ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
+ ok(ret, "HttpSendRequest failed\n");
|
||||
+
|
||||
+ test_status_code_todo(req, 400);
|
||||
+ InternetCloseHandle(req);
|
||||
+
|
||||
+ InternetCloseHandle( con );
|
||||
+ InternetCloseHandle( ses );
|
||||
+}
|
||||
+
|
||||
static void test_http1_1(int port)
|
||||
{
|
||||
HINTERNET ses, con, req;
|
||||
@@ -4392,6 +4500,7 @@ static void test_http_connection(void)
|
||||
test_basic_request(si.port, "GET", "/test6");
|
||||
test_basic_request(si.port, "GET", "/testF");
|
||||
test_connection_header(si.port);
|
||||
+ test_header_override(si.port);
|
||||
test_http1_1(si.port);
|
||||
test_cookie_header(si.port);
|
||||
test_basic_authentication(si.port);
|
||||
--
|
||||
2.4.0
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 7a7b4bf4644553b821deea0287289ffe54207768 Mon Sep 17 00:00:00 2001
|
||||
From 5049ef6fb20ab57cfe18209df3deee1bf1c5d069 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 15 May 2015 21:18:37 +0200
|
||||
Subject: wininet/tests: Test auth credential reusage with host override.
|
||||
@@ -8,10 +8,10 @@ Subject: wininet/tests: Test auth credential reusage with host override.
|
||||
1 file changed, 92 insertions(+)
|
||||
|
||||
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
|
||||
index 94f4ae9..4c515b7 100644
|
||||
index 559ab3e..29abb2f 100644
|
||||
--- a/dlls/wininet/tests/http.c
|
||||
+++ b/dlls/wininet/tests/http.c
|
||||
@@ -2378,6 +2378,20 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
@@ -2394,6 +2394,20 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
else
|
||||
send(c, notokmsg, sizeof notokmsg-1, 0);
|
||||
}
|
||||
@@ -32,10 +32,10 @@ index 94f4ae9..4c515b7 100644
|
||||
shutdown(c, 2);
|
||||
closesocket(c);
|
||||
c = -1;
|
||||
@@ -3070,6 +3084,84 @@ static void test_header_override(int port)
|
||||
|
||||
InternetCloseHandle( con );
|
||||
InternetCloseHandle( ses );
|
||||
@@ -3086,6 +3100,84 @@ static void test_header_override(int port)
|
||||
InternetCloseHandle(req);
|
||||
InternetCloseHandle(con);
|
||||
InternetCloseHandle(ses);
|
||||
+
|
||||
+ ses = InternetOpenA("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
|
||||
+ ok(ses != NULL, "InternetOpenA failed\n");
|
||||
@@ -118,5 +118,5 @@ index 94f4ae9..4c515b7 100644
|
||||
|
||||
static void test_http1_1(int port)
|
||||
--
|
||||
2.4.0
|
||||
2.4.3
|
||||
|
@@ -1,17 +1,17 @@
|
||||
From 9e879920a222f6c795b836fb687b6d3549c8c36e Mon Sep 17 00:00:00 2001
|
||||
From 6f8e73f6f05924035dcb731332298cc224ab8f20 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 15 May 2015 23:09:20 +0200
|
||||
Subject: wininet/tests: Check cookie behaviour when overriding host.
|
||||
|
||||
---
|
||||
dlls/wininet/tests/http.c | 101 +++++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 100 insertions(+), 1 deletion(-)
|
||||
dlls/wininet/tests/http.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 98 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
|
||||
index 4c515b7..165a76e 100644
|
||||
index 58eb5cc..6d1d48f 100644
|
||||
--- a/dlls/wininet/tests/http.c
|
||||
+++ b/dlls/wininet/tests/http.c
|
||||
@@ -1982,6 +1982,14 @@ static const char okmsg_cookie_path[] =
|
||||
@@ -1998,6 +1998,14 @@ static const char okmsg_cookie_path[] =
|
||||
"Set-Cookie: subcookie2=data; path=/test_cookie_set_path\r\n"
|
||||
"\r\n";
|
||||
|
||||
@@ -26,7 +26,7 @@ index 4c515b7..165a76e 100644
|
||||
static const char notokmsg[] =
|
||||
"HTTP/1.1 400 Bad Request\r\n"
|
||||
"Server: winetest\r\n"
|
||||
@@ -2371,6 +2379,25 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
@@ -2387,6 +2395,25 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
else
|
||||
send(c, notokmsg, sizeof notokmsg-1, 0);
|
||||
}
|
||||
@@ -52,12 +52,11 @@ index 4c515b7..165a76e 100644
|
||||
if (strstr(buffer, "/test_host_override"))
|
||||
{
|
||||
if (strstr(buffer, host_header_override))
|
||||
@@ -3082,6 +3109,76 @@ static void test_header_override(int port)
|
||||
@@ -3098,6 +3125,74 @@ static void test_header_override(int port)
|
||||
test_status_code_todo(req, 400);
|
||||
InternetCloseHandle(req);
|
||||
|
||||
InternetCloseHandle(req);
|
||||
+ InternetSetCookieA("http://localhost", "cookie", "biscuit");
|
||||
+
|
||||
+ req = HttpOpenRequestA(con, NULL, "/testC", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
@@ -68,8 +67,8 @@ index 4c515b7..165a76e 100644
|
||||
+ ok(ret, "HttpSendRequest failed\n");
|
||||
+
|
||||
+ test_status_code(req, 200);
|
||||
+ InternetCloseHandle(req);
|
||||
+
|
||||
+ InternetCloseHandle(req);
|
||||
+ req = HttpOpenRequestA(con, NULL, "/test_cookie_set_host_override", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
@@ -80,8 +79,8 @@ index 4c515b7..165a76e 100644
|
||||
+ ok(ret, "HttpSendRequest failed\n");
|
||||
+
|
||||
+ test_status_code(req, 200);
|
||||
+ InternetCloseHandle(req);
|
||||
+
|
||||
+ InternetCloseHandle(req);
|
||||
+ req = HttpOpenRequestA(con, NULL, "/test_cookie_check_host_override", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
@@ -92,8 +91,8 @@ index 4c515b7..165a76e 100644
|
||||
+ ok(ret, "HttpSendRequest failed\n");
|
||||
+
|
||||
+ test_status_code_todo(req, 200);
|
||||
+ InternetCloseHandle(req);
|
||||
+
|
||||
+ InternetCloseHandle(req);
|
||||
+ req = HttpOpenRequestA(con, NULL, "/test_cookie_check_host_override", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
@@ -101,10 +100,9 @@ index 4c515b7..165a76e 100644
|
||||
+ ok(ret, "HttpSendRequest failed\n");
|
||||
+
|
||||
+ test_status_code_todo(req, 200);
|
||||
+ InternetCloseHandle(req);
|
||||
+
|
||||
+ InternetCloseHandle(req);
|
||||
+ InternetSetCookieA("http://test.local", "foo", "bar");
|
||||
+
|
||||
+ req = HttpOpenRequestA(con, NULL, "/test_cookie_check_different_host", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
@@ -112,8 +110,8 @@ index 4c515b7..165a76e 100644
|
||||
+ ok(ret, "HttpSendRequest failed\n");
|
||||
+
|
||||
+ test_status_code(req, 200);
|
||||
+ InternetCloseHandle(req);
|
||||
+
|
||||
+ InternetCloseHandle(req);
|
||||
+ req = HttpOpenRequestA(con, NULL, "/test_cookie_check_different_host", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
@@ -124,12 +122,12 @@ index 4c515b7..165a76e 100644
|
||||
+ ok(ret, "HttpSendRequest failed\n");
|
||||
+
|
||||
+ test_status_code(req, 200);
|
||||
+ InternetCloseHandle(req);
|
||||
+
|
||||
InternetCloseHandle( con );
|
||||
InternetCloseHandle( ses );
|
||||
+ InternetCloseHandle(req);
|
||||
InternetCloseHandle(con);
|
||||
InternetCloseHandle(ses);
|
||||
|
||||
@@ -4453,8 +4550,10 @@ static void test_request_content_length(int port)
|
||||
@@ -4545,8 +4640,10 @@ static void test_request_content_length(int port)
|
||||
con = InternetConnectA(ses, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0);
|
||||
ok(con != NULL, "InternetConnect failed\n");
|
||||
|
||||
@@ -142,5 +140,5 @@ index 4c515b7..165a76e 100644
|
||||
|
||||
ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
--
|
||||
2.4.0
|
||||
2.4.3
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 086a65eab198ca7d2ab4215660369b0e05dbfbbf Mon Sep 17 00:00:00 2001
|
||||
From 72a8f7896554e752e1c924b71709e8cb0e48a51c 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:39:33 +0200
|
||||
Subject: wininet: Delay setting the http host header.
|
||||
@@ -11,7 +11,7 @@ working by pure accident before.
|
||||
2 files changed, 23 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
|
||||
index 3539dc8..356ebb6 100644
|
||||
index 5dd1b3b..e24a337 100644
|
||||
--- a/dlls/wininet/http.c
|
||||
+++ b/dlls/wininet/http.c
|
||||
@@ -376,6 +376,7 @@ static WCHAR *get_host_header( http_request_t *req )
|
||||
@@ -22,7 +22,7 @@ index 3539dc8..356ebb6 100644
|
||||
LeaveCriticalSection( &req->headers_section );
|
||||
return ret;
|
||||
}
|
||||
@@ -1878,20 +1879,21 @@ static BOOL HTTP_GetRequestURL(http_request_t *req, LPWSTR buf)
|
||||
@@ -1886,20 +1887,21 @@ static BOOL HTTP_GetRequestURL(http_request_t *req, LPWSTR buf)
|
||||
static const WCHAR https[] = { 'h','t','t','p','s',':','/','/',0 };
|
||||
static const WCHAR slash[] = { '/',0 };
|
||||
LPHTTPHEADERW host_header;
|
||||
@@ -49,7 +49,7 @@ index 3539dc8..356ebb6 100644
|
||||
if (req->path[0] != '/')
|
||||
strcatW(buf, slash);
|
||||
strcatW(buf, req->path);
|
||||
@@ -2132,14 +2134,19 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
|
||||
@@ -2140,14 +2142,19 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
|
||||
case INTERNET_OPTION_URL: {
|
||||
static const WCHAR httpW[] = {'h','t','t','p',':','/','/',0};
|
||||
WCHAR url[INTERNET_MAX_URL_LENGTH];
|
||||
@@ -72,7 +72,7 @@ index 3539dc8..356ebb6 100644
|
||||
strcatW(url, req->path);
|
||||
LeaveCriticalSection( &req->headers_section );
|
||||
|
||||
@@ -3406,8 +3413,6 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
|
||||
@@ -3417,8 +3424,6 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
|
||||
request->verb = heap_strdupW(lpszVerb && *lpszVerb ? lpszVerb : szGET);
|
||||
request->version = heap_strdupW(lpszVersion && *lpszVersion ? lpszVersion : g_szHttp1_1);
|
||||
|
||||
@@ -81,7 +81,7 @@ index 3539dc8..356ebb6 100644
|
||||
if (hIC->proxy && hIC->proxy[0] && !HTTP_ShouldBypassProxy(hIC, session->hostName))
|
||||
HTTP_DealWithProxy( hIC, session, request );
|
||||
|
||||
@@ -4899,6 +4904,9 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
|
||||
@@ -4911,6 +4916,9 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
|
||||
if (!request->verb)
|
||||
request->verb = heap_strdupW(szGET);
|
||||
|
||||
@@ -92,11 +92,11 @@ index 3539dc8..356ebb6 100644
|
||||
{
|
||||
sprintfW(contentLengthStr, szContentLength, dwContentLength);
|
||||
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
|
||||
index 165a76e..2ac075f 100644
|
||||
index 46a2258..5725b30 100644
|
||||
--- a/dlls/wininet/tests/http.c
|
||||
+++ b/dlls/wininet/tests/http.c
|
||||
@@ -3038,8 +3038,8 @@ static void test_header_override(int port)
|
||||
count = 0;
|
||||
@@ -3054,8 +3054,8 @@ static void test_header_override(int port)
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
ret = HttpQueryInfoA(req, HTTP_QUERY_HOST | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, &count);
|
||||
err = GetLastError();
|
||||
- todo_wine ok(!ret, "HttpQueryInfo succeeded\n");
|
||||
@@ -104,18 +104,18 @@ index 165a76e..2ac075f 100644
|
||||
+ ok(!ret, "HttpQueryInfo succeeded\n");
|
||||
+ ok(err == ERROR_HTTP_HEADER_NOT_FOUND, "Expected error ERROR_HTTP_HEADER_NOT_FOUND, got %d\n", err);
|
||||
|
||||
size = sizeof(buffer) - 1;
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
size = sizeof(buffer)-1;
|
||||
@@ -3065,7 +3065,7 @@ static void test_header_override(int port)
|
||||
@@ -3081,7 +3081,7 @@ static void test_header_override(int port)
|
||||
ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
ok(ret, "HttpSendRequest failed\n");
|
||||
|
||||
- test_status_code_todo(req, 200);
|
||||
+ test_status_code(req, 200);
|
||||
InternetCloseHandle(req);
|
||||
|
||||
InternetCloseHandle(req);
|
||||
req = HttpOpenRequestA(con, NULL, "/test_host_override", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
@@ -3215,7 +3215,7 @@ static void test_header_override(int port)
|
||||
@@ -3229,7 +3229,7 @@ static void test_header_override(int port)
|
||||
ret = HttpSendRequestA( req, NULL, 0, NULL, 0 );
|
||||
ok( ret, "HttpSendRequestA failed %u\n", GetLastError() );
|
||||
|
||||
@@ -124,7 +124,7 @@ index 165a76e..2ac075f 100644
|
||||
|
||||
InternetCloseHandle(req);
|
||||
InternetCloseHandle(con);
|
||||
@@ -3254,7 +3254,7 @@ static void test_header_override(int port)
|
||||
@@ -3268,7 +3268,7 @@ static void test_header_override(int port)
|
||||
ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
ok(ret, "HttpSendRequestA failed %u\n", GetLastError());
|
||||
|
||||
@@ -134,5 +134,5 @@ index 165a76e..2ac075f 100644
|
||||
InternetCloseHandle(req);
|
||||
InternetCloseHandle(con);
|
||||
--
|
||||
2.4.0
|
||||
2.4.3
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 31baebdaabf58e3bf1f1bdcb92f85cd5e0857a5b Mon Sep 17 00:00:00 2001
|
||||
From 53df41c8abfc5bafd1ba214d58a3edda1099024b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 16 May 2015 02:00:57 +0200
|
||||
Subject: wininet: Use request->server->canon_host_port when querying for
|
||||
@@ -10,10 +10,10 @@ Subject: wininet: Use request->server->canon_host_port when querying for
|
||||
2 files changed, 2 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
|
||||
index 3232fad..cfeb7ac 100644
|
||||
index b61a96a..edea9f8 100644
|
||||
--- a/dlls/wininet/http.c
|
||||
+++ b/dlls/wininet/http.c
|
||||
@@ -2134,21 +2134,12 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
|
||||
@@ -2142,21 +2142,12 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
|
||||
case INTERNET_OPTION_URL: {
|
||||
static const WCHAR httpW[] = {'h','t','t','p',':','/','/',0};
|
||||
WCHAR url[INTERNET_MAX_URL_LENGTH];
|
||||
@@ -37,11 +37,11 @@ index 3232fad..cfeb7ac 100644
|
||||
TRACE("INTERNET_OPTION_URL: %s\n",debugstr_w(url));
|
||||
return str_to_buffer(url, buffer, size, unicode);
|
||||
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
|
||||
index 9e207b9..469995b 100644
|
||||
index fd235b1..1a82aba 100644
|
||||
--- a/dlls/wininet/tests/http.c
|
||||
+++ b/dlls/wininet/tests/http.c
|
||||
@@ -3060,7 +3060,7 @@ static void test_header_override(int port)
|
||||
size = sizeof(buffer)-1;
|
||||
@@ -3076,7 +3076,7 @@ static void test_header_override(int port)
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
ret = InternetQueryOptionA(req, INTERNET_OPTION_URL, buffer, &size);
|
||||
ok(ret, "InternetQueryOption failed\n");
|
||||
- todo_wine ok(!strcmp(full_url, buffer), "Expected %s, got %s\n", full_url, buffer);
|
||||
@@ -50,5 +50,5 @@ index 9e207b9..469995b 100644
|
||||
ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
ok(ret, "HttpSendRequest failed\n");
|
||||
--
|
||||
2.4.0
|
||||
2.4.3
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 95a38cefff721e71d6d543b8f28da2e4c77362ab Mon Sep 17 00:00:00 2001
|
||||
From b5601ae74c8c528a2c636587a7b8678dfb717b5a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 16 May 2015 00:24:35 +0200
|
||||
Subject: wininet: Strip filename if no path is set in cookie.
|
||||
@@ -11,10 +11,10 @@ be a bit less strict in the test.
|
||||
2 files changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
|
||||
index 6681100..0b0f0b1 100644
|
||||
index edea9f8..f7c8f76 100644
|
||||
--- a/dlls/wininet/http.c
|
||||
+++ b/dlls/wininet/http.c
|
||||
@@ -758,10 +758,18 @@ static void HTTP_ProcessCookies( http_request_t *request )
|
||||
@@ -764,10 +764,18 @@ static void HTTP_ProcessCookies( http_request_t *request )
|
||||
int HeaderIndex;
|
||||
int numCookies = 0;
|
||||
LPHTTPHEADERW setCookieHeader;
|
||||
@@ -33,7 +33,7 @@ index 6681100..0b0f0b1 100644
|
||||
EnterCriticalSection( &request->headers_section );
|
||||
|
||||
while((HeaderIndex = HTTP_GetCustomHeaderIndex(request, szSet_Cookie, numCookies++, FALSE)) != -1)
|
||||
@@ -783,11 +791,12 @@ static void HTTP_ProcessCookies( http_request_t *request )
|
||||
@@ -789,11 +797,12 @@ static void HTTP_ProcessCookies( http_request_t *request )
|
||||
continue;
|
||||
|
||||
data++;
|
||||
@@ -48,10 +48,10 @@ index 6681100..0b0f0b1 100644
|
||||
|
||||
static void strip_spaces(LPWSTR start)
|
||||
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
|
||||
index 469995b..87f0668 100644
|
||||
index 1a82aba..ff76e9f 100644
|
||||
--- a/dlls/wininet/tests/http.c
|
||||
+++ b/dlls/wininet/tests/http.c
|
||||
@@ -2201,7 +2201,7 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
@@ -2217,7 +2217,7 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
}
|
||||
if (strstr(buffer, "/testC"))
|
||||
{
|
||||
@@ -60,24 +60,24 @@ index 469995b..87f0668 100644
|
||||
send(c, okmsg, sizeof okmsg-1, 0);
|
||||
else
|
||||
send(c, notokmsg, sizeof notokmsg-1, 0);
|
||||
@@ -3144,7 +3144,7 @@ static void test_header_override(int port)
|
||||
@@ -3159,7 +3159,7 @@ static void test_header_override(int port)
|
||||
ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
ok(ret, "HttpSendRequest failed\n");
|
||||
|
||||
- test_status_code_todo(req, 200);
|
||||
+ test_status_code(req, 200);
|
||||
InternetCloseHandle(req);
|
||||
|
||||
InternetCloseHandle(req);
|
||||
req = HttpOpenRequestA(con, NULL, "/test_cookie_check_host_override", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
@@ -3153,7 +3153,7 @@ static void test_header_override(int port)
|
||||
@@ -3168,7 +3168,7 @@ static void test_header_override(int port)
|
||||
ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
ok(ret, "HttpSendRequest failed\n");
|
||||
|
||||
- test_status_code_todo(req, 200);
|
||||
+ test_status_code(req, 200);
|
||||
InternetCloseHandle(req);
|
||||
|
||||
InternetCloseHandle(req);
|
||||
InternetSetCookieA("http://test.local", "foo", "bar");
|
||||
--
|
||||
2.4.0
|
||||
2.4.3
|
||||
|
@@ -1,34 +0,0 @@
|
||||
From 109b633fe845cab2b8abfe4a161ecb0e41ba4e86 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 16 May 2015 02:24:03 +0200
|
||||
Subject: rpcrt4: Fix arguments of HttpAddRequestHeaders.
|
||||
|
||||
---
|
||||
dlls/rpcrt4/rpc_transport.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
|
||||
index 34f434d..0504d51 100644
|
||||
--- a/dlls/rpcrt4/rpc_transport.c
|
||||
+++ b/dlls/rpcrt4/rpc_transport.c
|
||||
@@ -2275,7 +2275,7 @@ static RPC_STATUS insert_content_length_header(HINTERNET request, DWORD len)
|
||||
WCHAR header[sizeof(fmtW) / sizeof(fmtW[0]) + 10];
|
||||
|
||||
sprintfW(header, fmtW, len);
|
||||
- if ((HttpAddRequestHeadersW(request, header, -1, HTTP_ADDREQ_FLAG_REPLACE))) return RPC_S_OK;
|
||||
+ if ((HttpAddRequestHeadersW(request, header, -1, HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDREQ_FLAG_ADD))) return RPC_S_OK;
|
||||
return RPC_S_SERVER_UNAVAILABLE;
|
||||
}
|
||||
|
||||
@@ -2866,7 +2866,7 @@ static RPC_STATUS authorize_request(RpcConnection_http *httpc, HINTERNET request
|
||||
}
|
||||
|
||||
if (info->scheme != RPC_C_HTTP_AUTHN_SCHEME_BASIC)
|
||||
- HttpAddRequestHeadersW(request, authW, -1, HTTP_ADDREQ_FLAG_REPLACE);
|
||||
+ HttpAddRequestHeadersW(request, authW, -1, HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDREQ_FLAG_ADD);
|
||||
|
||||
destroy_authinfo(info);
|
||||
return status;
|
||||
--
|
||||
2.4.0
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 5d96dbdcf3e2ade7aad2745f8c48a3e56ba264c2 Mon Sep 17 00:00:00 2001
|
||||
From 91c7ab52a873c9c6443443937bad998f5dc40bbd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 16 May 2015 03:16:15 +0200
|
||||
Subject: wininet: Replacing header fields should fail if they do not exist
|
||||
@@ -13,10 +13,10 @@ a way that it behaves identical to the old code in such situations.
|
||||
2 files changed, 96 insertions(+), 95 deletions(-)
|
||||
|
||||
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
|
||||
index 0b0f0b1..b32f9a3 100644
|
||||
index f7c8f76..85bc392 100644
|
||||
--- a/dlls/wininet/http.c
|
||||
+++ b/dlls/wininet/http.c
|
||||
@@ -6106,127 +6106,128 @@ static LPWSTR * HTTP_InterpretHttpHeader(LPCWSTR buffer)
|
||||
@@ -6115,127 +6115,128 @@ static LPWSTR * HTTP_InterpretHttpHeader(LPCWSTR buffer)
|
||||
|
||||
static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR value, DWORD dwModifier)
|
||||
{
|
||||
@@ -238,10 +238,10 @@ index 0b0f0b1..b32f9a3 100644
|
||||
LeaveCriticalSection( &request->headers_section );
|
||||
return res;
|
||||
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
|
||||
index 87f0668..7444a67 100644
|
||||
index ff76e9f..8b5cdb7 100644
|
||||
--- a/dlls/wininet/tests/http.c
|
||||
+++ b/dlls/wininet/tests/http.c
|
||||
@@ -3100,13 +3100,13 @@ static void test_header_override(int port)
|
||||
@@ -3116,13 +3116,13 @@ static void test_header_override(int port)
|
||||
|
||||
ret = HttpAddRequestHeadersA(req, host_header_override, ~0u, HTTP_ADDREQ_FLAG_REPLACE);
|
||||
err = GetLastError();
|
||||
@@ -255,9 +255,9 @@ index 87f0668..7444a67 100644
|
||||
|
||||
- test_status_code_todo(req, 400);
|
||||
+ test_status_code(req, 400);
|
||||
InternetCloseHandle(req);
|
||||
|
||||
InternetCloseHandle(req);
|
||||
InternetSetCookieA("http://localhost", "cookie", "biscuit");
|
||||
--
|
||||
2.4.0
|
||||
2.4.3
|
||||
|
@@ -1,74 +0,0 @@
|
||||
From 60e158b648b47ce743f5ceabdad0354324ee7391 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 16 May 2015 02:29:42 +0200
|
||||
Subject: wininet: Fix arguments of HttpAddRequestHeaders.
|
||||
|
||||
---
|
||||
dlls/wininet/http.c | 16 ++++++++++------
|
||||
1 file changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
|
||||
index cfeb7ac..6681100 100644
|
||||
--- a/dlls/wininet/http.c
|
||||
+++ b/dlls/wininet/http.c
|
||||
@@ -1661,7 +1661,8 @@ static BOOL HTTP_InsertAuthorization( http_request_t *request, struct HttpAuthIn
|
||||
|
||||
TRACE("Inserting authorization: %s\n", debugstr_w(authorization));
|
||||
|
||||
- HTTP_ProcessHeader(request, header, authorization, HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE);
|
||||
+ HTTP_ProcessHeader(request, header, authorization,
|
||||
+ HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE | HTTP_ADDREQ_FLAG_ADD);
|
||||
heap_free(authorization);
|
||||
}
|
||||
else if (!strcmpW(header, szAuthorization) && (host = get_host_header(request)))
|
||||
@@ -1682,7 +1683,8 @@ static BOOL HTTP_InsertAuthorization( http_request_t *request, struct HttpAuthIn
|
||||
|
||||
TRACE("Inserting authorization: %s\n", debugstr_w(authorization));
|
||||
|
||||
- HTTP_ProcessHeader(request, header, authorization, HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE);
|
||||
+ HTTP_ProcessHeader(request, header, authorization,
|
||||
+ HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE | HTTP_ADDHDR_FLAG_ADD);
|
||||
heap_free(data);
|
||||
heap_free(authorization);
|
||||
}
|
||||
@@ -3397,7 +3399,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
|
||||
HTTP_ProcessHeader(request, HTTP_ACCEPT, lpszAcceptTypes[i],
|
||||
HTTP_ADDHDR_FLAG_COALESCE_WITH_COMMA |
|
||||
HTTP_ADDHDR_FLAG_REQ |
|
||||
- (i == 0 ? HTTP_ADDHDR_FLAG_REPLACE : 0));
|
||||
+ (i == 0 ? (HTTP_ADDHDR_FLAG_REPLACE | HTTP_ADDHDR_FLAG_ADD) : 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4235,7 +4237,8 @@ static void HTTP_InsertCookies(http_request_t *request)
|
||||
if(res != ERROR_SUCCESS || !cookies)
|
||||
return;
|
||||
|
||||
- HTTP_HttpAddRequestHeadersW(request, cookies, strlenW(cookies), HTTP_ADDREQ_FLAG_REPLACE);
|
||||
+ HTTP_HttpAddRequestHeadersW(request, cookies, strlenW(cookies),
|
||||
+ HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDREQ_FLAG_ADD);
|
||||
heap_free(cookies);
|
||||
}
|
||||
|
||||
@@ -4959,7 +4962,8 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
|
||||
HTTP_FixURL(request);
|
||||
if (request->hdr.dwFlags & INTERNET_FLAG_KEEP_CONNECTION)
|
||||
{
|
||||
- HTTP_ProcessHeader(request, szConnection, szKeepAlive, HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE);
|
||||
+ HTTP_ProcessHeader(request, szConnection, szKeepAlive,
|
||||
+ HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE | HTTP_ADDHDR_FLAG_ADD);
|
||||
}
|
||||
HTTP_InsertAuthorization(request, request->authInfo, szAuthorization);
|
||||
HTTP_InsertAuthorization(request, request->proxyAuthInfo, szProxy_Authorization);
|
||||
@@ -5976,7 +5980,7 @@ static DWORD HTTP_GetResponseHeaders(http_request_t *request, INT *len)
|
||||
|
||||
/* Add status code */
|
||||
HTTP_ProcessHeader(request, szStatus, status_code,
|
||||
- HTTP_ADDHDR_FLAG_REPLACE);
|
||||
+ HTTP_ADDHDR_FLAG_REPLACE | HTTP_ADDHDR_FLAG_ADD);
|
||||
|
||||
heap_free(request->version);
|
||||
heap_free(request->statusText);
|
||||
--
|
||||
2.4.0
|
||||
|
Reference in New Issue
Block a user