mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Updated wininet-Cleanup patchset
Warning fixes.
This commit is contained in:
parent
191f951992
commit
7f7bf3b682
@ -129,7 +129,7 @@ index 98d1b74ca85..308d6a74c20 100644
|
||||
+ ok(req != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
+ ret = HttpAddRequestHeadersA(req, "Cookie: manual_cookie=test\r\n", ~0u, HTTP_ADDREQ_FLAG_ADD);
|
||||
+ ok(ret, "HttpAddRequestHeaders failed: %u\n", GetLastError());
|
||||
+ ok(ret, "HttpAddRequestHeaders failed: %lu\n", GetLastError());
|
||||
+
|
||||
+ ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
+ ok(ret, "HttpSendRequest failed\n");
|
||||
|
@ -49,13 +49,13 @@ index b06bd6c04d1..59689baf87e 100644
|
||||
+ ok(ses != NULL, "InternetOpenA failed\n");
|
||||
+
|
||||
+ con = InternetConnectA(ses, "localhost", port, "test1", "pass", INTERNET_SERVICE_HTTP, 0, 0);
|
||||
+ ok(con != NULL, "InternetConnectA failed %u\n", GetLastError());
|
||||
+ ok(con != NULL, "InternetConnectA failed %lu\n", GetLastError());
|
||||
+
|
||||
+ req = HttpOpenRequestA( con, "HEAD", "/test_auth_host1", NULL, NULL, NULL, 0, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequestA failed %u\n", GetLastError());
|
||||
+ ok(req != NULL, "HttpOpenRequestA failed %lu\n", GetLastError());
|
||||
+
|
||||
+ ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
+ ok(ret, "HttpSendRequestA failed %u\n", GetLastError());
|
||||
+ ok(ret, "HttpSendRequestA failed %lu\n", GetLastError());
|
||||
+
|
||||
+ test_status_code(req, 200);
|
||||
+
|
||||
@ -67,16 +67,16 @@ index b06bd6c04d1..59689baf87e 100644
|
||||
+ ok(ses != NULL, "InternetOpenA failed\n");
|
||||
+
|
||||
+ con = InternetConnectA( ses, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0);
|
||||
+ ok(con != NULL, "InternetConnectA failed %u\n", GetLastError());
|
||||
+ ok(con != NULL, "InternetConnectA failed %lu\n", GetLastError());
|
||||
+
|
||||
+ req = HttpOpenRequestA(con, "HEAD", "/test_auth_host1", NULL, NULL, NULL, 0, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequestA failed %u\n", GetLastError());
|
||||
+ ok(req != NULL, "HttpOpenRequestA failed %lu\n", GetLastError());
|
||||
+
|
||||
+ 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, "HttpSendRequestA failed %u\n", GetLastError() );
|
||||
+ ok( ret, "HttpSendRequestA failed %lu\n", GetLastError() );
|
||||
+
|
||||
+ test_status_code(req, 200);
|
||||
+
|
||||
@ -88,16 +88,16 @@ index b06bd6c04d1..59689baf87e 100644
|
||||
+ ok(ses != NULL, "InternetOpenA failed\n");
|
||||
+
|
||||
+ con = InternetConnectA(ses, "localhost", port, "test1", "pass2", INTERNET_SERVICE_HTTP, 0, 0);
|
||||
+ ok(con != NULL, "InternetConnectA failed %u\n", GetLastError());
|
||||
+ ok(con != NULL, "InternetConnectA failed %lu\n", GetLastError());
|
||||
+
|
||||
+ req = HttpOpenRequestA(con, "HEAD", "/test_auth_host2", NULL, NULL, NULL, 0, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequestA failed %u\n", GetLastError());
|
||||
+ ok(req != NULL, "HttpOpenRequestA failed %lu\n", GetLastError());
|
||||
+
|
||||
+ 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, "HttpSendRequestA failed %u\n", GetLastError());
|
||||
+ ok(ret, "HttpSendRequestA failed %lu\n", GetLastError());
|
||||
+
|
||||
+ test_status_code(req, 200);
|
||||
+
|
||||
@ -109,13 +109,13 @@ index b06bd6c04d1..59689baf87e 100644
|
||||
+ ok(ses != NULL, "InternetOpenA failed\n");
|
||||
+
|
||||
+ con = InternetConnectA(ses, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0);
|
||||
+ ok(con != NULL, "InternetConnectA failed %u\n", GetLastError());
|
||||
+ ok(con != NULL, "InternetConnectA failed %lu\n", GetLastError());
|
||||
+
|
||||
+ req = HttpOpenRequestA(con, "HEAD", "/test_auth_host2", NULL, NULL, NULL, 0, 0);
|
||||
+ ok(req != NULL, "HttpOpenRequestA failed %u\n", GetLastError());
|
||||
+ ok(req != NULL, "HttpOpenRequestA failed %lu\n", GetLastError());
|
||||
+
|
||||
+ ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
|
||||
+ ok(ret, "HttpSendRequestA failed %u\n", GetLastError());
|
||||
+ ok(ret, "HttpSendRequestA failed %lu\n", GetLastError());
|
||||
+
|
||||
+ test_status_code(req, 200);
|
||||
+
|
||||
|
@ -1,17 +1,17 @@
|
||||
From 21ca3efb2a8a1f505f9e3f3ed2126a766d4a127f Mon Sep 17 00:00:00 2001
|
||||
From 691cc2563d203b7b8862406fbd373f61bccea9e2 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.
|
||||
Subject: [PATCH] wininet/tests: Check cookie behaviour when overriding host.
|
||||
|
||||
---
|
||||
dlls/wininet/tests/http.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wininet/tests/http.c | 95 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 95 insertions(+)
|
||||
|
||||
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
|
||||
index 546e473..0121aa5 100644
|
||||
index 43eba2db172..2ccba48fa2f 100644
|
||||
--- a/dlls/wininet/tests/http.c
|
||||
+++ b/dlls/wininet/tests/http.c
|
||||
@@ -2000,6 +2000,14 @@ static const char okmsg_cookie_path[] =
|
||||
@@ -2113,6 +2113,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 546e473..0121aa5 100644
|
||||
static const char notokmsg[] =
|
||||
"HTTP/1.1 400 Bad Request\r\n"
|
||||
"Server: winetest\r\n"
|
||||
@@ -2391,6 +2399,25 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
@@ -2558,6 +2566,25 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
else
|
||||
send(c, notokmsg, sizeof notokmsg-1, 0);
|
||||
}
|
||||
@ -52,10 +52,11 @@ index 546e473..0121aa5 100644
|
||||
if (strstr(buffer, "/test_host_override"))
|
||||
{
|
||||
if (strstr(buffer, host_header_override))
|
||||
@@ -3130,6 +3157,74 @@ static void test_header_override(int port)
|
||||
@@ -3305,6 +3332,74 @@ static void test_header_override(int port)
|
||||
test_status_code(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");
|
||||
@ -123,10 +124,9 @@ index 546e473..0121aa5 100644
|
||||
+
|
||||
+ test_status_code(req, 200);
|
||||
+
|
||||
+ InternetCloseHandle(req);
|
||||
InternetCloseHandle(req);
|
||||
InternetCloseHandle(con);
|
||||
InternetCloseHandle(ses);
|
||||
|
||||
--
|
||||
2.8.0
|
||||
2.35.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user