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 4be4e282b737a7cfbccf18552a581ee6de3ac13c.
[winsta-WinStationEnumerateW] Removed patch to add stub for winsta.WinStationEnumerateW (accepted upstream).
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
From 842a91f83a472f364f6617f90a657603385fbc59 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 25 Apr 2016 21:46:29 +0200
|
||||
Subject: wininet: Handle INTERNET_INVALID_PORT_NUMBER in HttpOpenRequest.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Michael Müller <michael@fds-team.de>
|
||||
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
|
||||
---
|
||||
dlls/wininet/http.c | 11 +++++++++--
|
||||
dlls/wininet/tests/http.c | 6 +++---
|
||||
2 files changed, 12 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
|
||||
index ef0b36e..9d75b59 100644
|
||||
--- a/dlls/wininet/http.c
|
||||
+++ b/dlls/wininet/http.c
|
||||
@@ -3331,7 +3331,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
|
||||
{
|
||||
appinfo_t *hIC = session->appInfo;
|
||||
http_request_t *request;
|
||||
- DWORD len;
|
||||
+ DWORD port, len;
|
||||
|
||||
TRACE("-->\n");
|
||||
|
||||
@@ -3360,7 +3360,14 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
|
||||
request->session = session;
|
||||
list_add_head( &session->hdr.children, &request->hdr.entry );
|
||||
|
||||
- request->server = get_server(session->hostName, session->hostPort, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE);
|
||||
+ port = session->hostPort;
|
||||
+ if (port == INTERNET_INVALID_PORT_NUMBER)
|
||||
+ {
|
||||
+ port = (session->hdr.dwFlags & INTERNET_FLAG_SECURE) ?
|
||||
+ INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT;
|
||||
+ }
|
||||
+
|
||||
+ request->server = get_server(session->hostName, port, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE);
|
||||
if(!request->server) {
|
||||
WININET_Release(&request->hdr);
|
||||
return ERROR_OUTOFMEMORY;
|
||||
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
|
||||
index 66ba526..6aa0f4c 100644
|
||||
--- a/dlls/wininet/tests/http.c
|
||||
+++ b/dlls/wininet/tests/http.c
|
||||
@@ -5771,13 +5771,13 @@ static void test_default_service_port(void)
|
||||
ok(request != NULL, "HttpOpenRequest failed\n");
|
||||
|
||||
ret = HttpSendRequestA(request, NULL, 0, NULL, 0);
|
||||
- todo_wine ok(ret, "HttpSendRequest failed with error %u\n", GetLastError());
|
||||
+ ok(ret, "HttpSendRequest failed with error %u\n", GetLastError());
|
||||
|
||||
size = sizeof(buffer);
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
ret = HttpQueryInfoA(request, HTTP_QUERY_HOST | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, NULL);
|
||||
ok(ret, "HttpQueryInfo failed with error %u\n", GetLastError());
|
||||
- todo_wine ok(!strcmp(buffer, "test.winehq.org"), "Expected test.winehg.org, got '%s'\n", buffer);
|
||||
+ ok(!strcmp(buffer, "test.winehq.org"), "Expected test.winehg.org, got '%s'\n", buffer);
|
||||
|
||||
InternetCloseHandle(request);
|
||||
InternetCloseHandle(connect);
|
||||
@@ -5796,7 +5796,7 @@ static void test_default_service_port(void)
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
ret = HttpQueryInfoA(request, HTTP_QUERY_HOST | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, NULL);
|
||||
ok(ret, "HttpQueryInfo failed with error %u\n", GetLastError());
|
||||
- todo_wine ok(!strcmp(buffer, "test.winehq.org:443"), "Expected test.winehg.org:443, got '%s'\n", buffer);
|
||||
+ ok(!strcmp(buffer, "test.winehq.org:443"), "Expected test.winehg.org:443, got '%s'\n", buffer);
|
||||
|
||||
InternetCloseHandle(request);
|
||||
InternetCloseHandle(connect);
|
||||
--
|
||||
2.8.0
|
||||
|
@@ -1,118 +0,0 @@
|
||||
From 66e49d5b0868a9832f339056ddfd25cf4aee01ba Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 19 Mar 2016 03:53:51 +0100
|
||||
Subject: wininet: Set default HTTP port correctly when passing
|
||||
INTERNET_FLAG_SECURE to InternetConnect.
|
||||
|
||||
---
|
||||
dlls/wininet/http.c | 8 +++++--
|
||||
dlls/wininet/tests/http.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 65 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
|
||||
index 143dc75..2f8fba4 100644
|
||||
--- a/dlls/wininet/http.c
|
||||
+++ b/dlls/wininet/http.c
|
||||
@@ -3335,7 +3335,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
|
||||
{
|
||||
appinfo_t *hIC = session->appInfo;
|
||||
http_request_t *request;
|
||||
- DWORD len;
|
||||
+ DWORD port, len;
|
||||
|
||||
TRACE("-->\n");
|
||||
|
||||
@@ -3364,7 +3364,11 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
|
||||
request->session = session;
|
||||
list_add_head( &session->hdr.children, &request->hdr.entry );
|
||||
|
||||
- request->server = get_server(session->hostName, session->hostPort, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE);
|
||||
+ port = session->hostPort;
|
||||
+ if (port == INTERNET_INVALID_PORT_NUMBER)
|
||||
+ port = (session->hdr.dwFlags & INTERNET_FLAG_SECURE) ? INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT;
|
||||
+
|
||||
+ request->server = get_server(session->hostName, port, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE);
|
||||
if(!request->server) {
|
||||
WININET_Release(&request->hdr);
|
||||
return ERROR_OUTOFMEMORY;
|
||||
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
|
||||
index 82fd10b..4e5b7fe 100644
|
||||
--- a/dlls/wininet/tests/http.c
|
||||
+++ b/dlls/wininet/tests/http.c
|
||||
@@ -5733,7 +5733,8 @@ static void test_connection_failure(void)
|
||||
static void test_default_service_port(void)
|
||||
{
|
||||
HINTERNET session, connect, request;
|
||||
- DWORD error;
|
||||
+ DWORD size, count, error;
|
||||
+ char buffer[128];
|
||||
BOOL ret;
|
||||
|
||||
session = InternetOpenA("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
|
||||
@@ -5753,6 +5754,63 @@ static void test_default_service_port(void)
|
||||
ok(error == ERROR_INTERNET_SECURITY_CHANNEL_ERROR || error == ERROR_INTERNET_CANNOT_CONNECT,
|
||||
"got %u\n", error);
|
||||
|
||||
+ size = sizeof(buffer) - 1;
|
||||
+ count = 0;
|
||||
+ memset(buffer, 0, sizeof(buffer));
|
||||
+ ret = HttpQueryInfoA(request, HTTP_QUERY_HOST | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, &count);
|
||||
+ ok(ret, "HttpQueryInfo succeeded\n");
|
||||
+ ok(!strcmp(buffer, "test.winehq.org:80"), "Expected test.winehg.org:80, got %s\n", buffer);
|
||||
+
|
||||
+ InternetCloseHandle(request);
|
||||
+ InternetCloseHandle(connect);
|
||||
+ InternetCloseHandle(session);
|
||||
+
|
||||
+ session = InternetOpenA("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
|
||||
+ ok(session != NULL, "InternetOpen failed\n");
|
||||
+
|
||||
+ connect = InternetConnectA(session, "test.winehq.org", INTERNET_INVALID_PORT_NUMBER, NULL, NULL,
|
||||
+ INTERNET_SERVICE_HTTP, INTERNET_FLAG_SECURE, 0);
|
||||
+ ok(connect != NULL, "InternetConnect failed\n");
|
||||
+
|
||||
+ request = HttpOpenRequestA(connect, NULL, "/", NULL, NULL, NULL, INTERNET_FLAG_SECURE, 0);
|
||||
+ ok(request != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = HttpSendRequestA(request, NULL, 0, NULL, 0);
|
||||
+ ok(ret, "HttpSendRequest failed with error %u\n", GetLastError());
|
||||
+
|
||||
+ size = sizeof(buffer) - 1;
|
||||
+ count = 0;
|
||||
+ memset(buffer, 0, sizeof(buffer));
|
||||
+ ret = HttpQueryInfoA(request, HTTP_QUERY_HOST | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, &count);
|
||||
+ ok(ret, "HttpQueryInfo succeeded\n");
|
||||
+ ok(!strcmp(buffer, "test.winehq.org"), "Expected test.winehg.org, got %s\n", buffer);
|
||||
+
|
||||
+ InternetCloseHandle(request);
|
||||
+ InternetCloseHandle(connect);
|
||||
+ InternetCloseHandle(session);
|
||||
+
|
||||
+ session = InternetOpenA("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
|
||||
+ ok(session != NULL, "InternetOpen failed\n");
|
||||
+
|
||||
+ connect = InternetConnectA(session, "test.winehq.org", INTERNET_INVALID_PORT_NUMBER, NULL, NULL,
|
||||
+ INTERNET_SERVICE_HTTP, INTERNET_FLAG_SECURE, 0);
|
||||
+ ok(connect != NULL, "InternetConnect failed\n");
|
||||
+
|
||||
+ request = HttpOpenRequestA(connect, NULL, "/", NULL, NULL, NULL, 0, 0);
|
||||
+ ok(request != NULL, "HttpOpenRequest failed\n");
|
||||
+
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = HttpSendRequestA(request, NULL, 0, NULL, 0);
|
||||
+ ok(ret, "HttpSendRequest failed with error %u\n", GetLastError());
|
||||
+
|
||||
+ size = sizeof(buffer) - 1;
|
||||
+ count = 0;
|
||||
+ memset(buffer, 0, sizeof(buffer));
|
||||
+ ret = HttpQueryInfoA(request, HTTP_QUERY_HOST | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, &count);
|
||||
+ ok(ret, "HttpQueryInfo succeeded\n");
|
||||
+ ok(!strcmp(buffer, "test.winehq.org:443"), "Expected test.winehg.org:443, got %s\n", buffer);
|
||||
+
|
||||
InternetCloseHandle(request);
|
||||
InternetCloseHandle(connect);
|
||||
InternetCloseHandle(session);
|
||||
--
|
||||
2.7.1
|
||||
|
Reference in New Issue
Block a user