From e86a326f7b91b9ca3b70f4435b83314fe50f6cec Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 25 Jun 2015 16:37:32 +0200 Subject: [PATCH] Rebase against efd41e4f2b1c784d4939aa10d869f87f2384f10c. --- README.md | 2 +- debian/changelog | 2 + .../0001-fltlib-Add-stub-for-FilterLoad.patch | 56 ------ patches/fltlib-FilterLoad/definition | 2 - patches/patchinstall.sh | 83 +++------ ...net-tests-Add-more-tests-for-cookies.patch | 30 ++-- ...Add-tests-for-overriding-host-header.patch | 160 ------------------ ...t-auth-credential-reusage-with-host.patch} | 16 +- ...ck-cookie-behaviour-when-overriding.patch} | 38 ++--- ...st-server-name-when-processing-cook.patch} | 0 ...-Delay-setting-the-http-host-header.patch} | 30 ++-- ...st-server-canon_host_port-in-authen.patch} | 0 ...st-server-canon_host_port-when-quer.patch} | 14 +- ...ilename-if-no-path-is-set-in-cookie.patch} | 22 +-- ...x-arguments-of-HttpAddRequestHeaders.patch | 34 ---- ...-header-fields-should-fail-if-they-.patch} | 14 +- ...x-arguments-of-HttpAddRequestHeaders.patch | 74 -------- 17 files changed, 111 insertions(+), 466 deletions(-) delete mode 100644 patches/fltlib-FilterLoad/0001-fltlib-Add-stub-for-FilterLoad.patch delete mode 100644 patches/fltlib-FilterLoad/definition delete mode 100644 patches/wininet-Cleanup/0002-wininet-tests-Add-tests-for-overriding-host-header.patch rename patches/wininet-Cleanup/{0003-wininet-tests-Test-auth-credential-reusage-with-host.patch => 0002-wininet-tests-Test-auth-credential-reusage-with-host.patch} (93%) rename patches/wininet-Cleanup/{0004-wininet-tests-Check-cookie-behaviour-when-overriding.patch => 0003-wininet-tests-Check-cookie-behaviour-when-overriding.patch} (90%) rename patches/wininet-Cleanup/{0005-wininet-Use-request-server-name-when-processing-cook.patch => 0004-wininet-Use-request-server-name-when-processing-cook.patch} (100%) rename patches/wininet-Cleanup/{0006-wininet-Delay-setting-the-http-host-header.patch => 0005-wininet-Delay-setting-the-http-host-header.patch} (87%) rename patches/wininet-Cleanup/{0007-wininet-Use-request-server-canon_host_port-in-authen.patch => 0006-wininet-Use-request-server-canon_host_port-in-authen.patch} (100%) rename patches/wininet-Cleanup/{0008-wininet-Use-request-server-canon_host_port-when-quer.patch => 0007-wininet-Use-request-server-canon_host_port-when-quer.patch} (85%) rename patches/wininet-Cleanup/{0011-wininet-Strip-filename-if-no-path-is-set-in-cookie.patch => 0008-wininet-Strip-filename-if-no-path-is-set-in-cookie.patch} (84%) delete mode 100644 patches/wininet-Cleanup/0009-rpcrt4-Fix-arguments-of-HttpAddRequestHeaders.patch rename patches/wininet-Cleanup/{0012-wininet-Replacing-header-fields-should-fail-if-they-.patch => 0009-wininet-Replacing-header-fields-should-fail-if-they-.patch} (97%) delete mode 100644 patches/wininet-Cleanup/0010-wininet-Fix-arguments-of-HttpAddRequestHeaders.patch diff --git a/README.md b/README.md index 9c420614..da5cfc5f 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ for more details.* * Add stub for D3DXIntersect * Add stub for NtSetLdtEntries/ZwSetLdtEntries ([Wine Bug #26268](https://bugs.winehq.org/show_bug.cgi?id=26268)) * Add stub for d3d11.D3D11CreateDeviceAndSwapChain ([Wine Bug #33153](https://bugs.winehq.org/show_bug.cgi?id=33153)) -* Add stub for fltlib.FilterLoad ([Wine Bug #38435](https://bugs.winehq.org/show_bug.cgi?id=38435)) +* ~~Add stub for fltlib.FilterLoad~~ ([Wine Bug #38435](https://bugs.winehq.org/show_bug.cgi?id=38435)) * Add stub for gdiplus.GdipCreateEffect ([Wine Bug #32163](https://bugs.winehq.org/show_bug.cgi?id=32163)) * ~~Add stub for kernel32.SetFileCompletionNotificationModes (for Steam in Win7 mode)~~ ([Wine Bug #38493](https://bugs.winehq.org/show_bug.cgi?id=38493)) * Add stub for ntoskrnl.ExAcquireResourceExclusiveLite diff --git a/debian/changelog b/debian/changelog index 7510faa4..c8e9fefd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,8 @@ wine-staging (1.7.46) UNRELEASED; urgency=low (accepted upstream). * Removed patches to implement GetVolumePathName (accepted upstream). * Removed patch for advapi32.GetWindowsAccountDomainSid (accepted upstream). + * Removed patch for stub implementation of fltlib.FilterLoad (accepted + upstream). * Removed patch to fix linking against libunwind on Linux (fixed upstream). -- Sebastian Lackner Sun, 14 Jun 2015 09:15:50 +0200 diff --git a/patches/fltlib-FilterLoad/0001-fltlib-Add-stub-for-FilterLoad.patch b/patches/fltlib-FilterLoad/0001-fltlib-Add-stub-for-FilterLoad.patch deleted file mode 100644 index 4bdf9e3b..00000000 --- a/patches/fltlib-FilterLoad/0001-fltlib-Add-stub-for-FilterLoad.patch +++ /dev/null @@ -1,56 +0,0 @@ -From eea1bf682741ba15c313e8467ea5156e59dd87b8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Fri, 19 Jun 2015 05:01:49 +0200 -Subject: fltlib: Add stub for FilterLoad. - ---- - dlls/fltlib/fltlib.c | 15 ++++++++++++--- - dlls/fltlib/fltlib.spec | 2 +- - 2 files changed, 13 insertions(+), 4 deletions(-) - -diff --git a/dlls/fltlib/fltlib.c b/dlls/fltlib/fltlib.c -index 50f46ac..b968c2b 100644 ---- a/dlls/fltlib/fltlib.c -+++ b/dlls/fltlib/fltlib.c -@@ -79,13 +79,22 @@ HRESULT WINAPI FilterFindClose(HANDLE handle) - } - - /********************************************************************** -+ * FilterLoad (FLTLIB.@) -+ */ -+HRESULT WINAPI FilterLoad(LPCWSTR filtername) -+{ -+ FIXME("(%s) stub\n", debugstr_w(filtername)); -+ return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED); -+} -+ -+/********************************************************************** - * FilterUnload (FLTLIB.@) - */ --HRESULT WINAPI FilterUnload(LPCWSTR lpFilterName) -+HRESULT WINAPI FilterUnload(LPCWSTR filtername) - { -- FIXME("(%s) stub\n", debugstr_w(lpFilterName)); -+ FIXME("(%s) stub\n", debugstr_w(filtername)); - -- if (!lpFilterName) -+ if (!filtername) - return HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER); - - return S_OK; -diff --git a/dlls/fltlib/fltlib.spec b/dlls/fltlib/fltlib.spec -index 91e803b..226a615 100644 ---- a/dlls/fltlib/fltlib.spec -+++ b/dlls/fltlib/fltlib.spec -@@ -16,7 +16,7 @@ - @ stub FilterInstanceFindFirst - @ stub FilterInstanceFindNext - @ stub FilterInstanceGetInformation --@ stub FilterLoad -+@ stdcall FilterLoad(wstr) - @ stub FilterReplyMessage - @ stub FilterSendMessage - @ stdcall FilterUnload(wstr) --- -2.4.3 - diff --git a/patches/fltlib-FilterLoad/definition b/patches/fltlib-FilterLoad/definition deleted file mode 100644 index 3b66449a..00000000 --- a/patches/fltlib-FilterLoad/definition +++ /dev/null @@ -1,2 +0,0 @@ -Fixes: [38435] Add stub for fltlib.FilterLoad -Category: stable diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index b6e95a6e..bf9f391d 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -55,7 +55,7 @@ version() echo "Copyright (C) 2014-2015 the Wine Staging project authors." echo "" echo "Patchset to be applied on upstream Wine:" - echo " commit 4f3acf31deef5893b057778695fa5691ccac32df" + echo " commit efd41e4f2b1c784d4939aa10d869f87f2384f10c" echo "" } @@ -116,7 +116,6 @@ patch_enable_all () enable_dsound_Fast_Mixer="$1" enable_dxgi_GetDesc="$1" enable_dxva2_Video_Decoder="$1" - enable_fltlib_FilterLoad="$1" enable_fltmgr_Stub_SYS="$1" enable_fonts_Missing_Fonts="$1" enable_gdi32_Default_Palette="$1" @@ -423,9 +422,6 @@ patch_enable () dxva2-Video_Decoder) enable_dxva2_Video_Decoder="$2" ;; - fltlib-FilterLoad) - enable_fltlib_FilterLoad="$2" - ;; fltmgr-Stub_SYS) enable_fltmgr_Stub_SYS="$2" ;; @@ -1344,9 +1340,6 @@ if test "$enable_category_stable" -eq 1; then if test "$enable_dxgi_GetDesc" -gt 1; then abort "Patchset dxgi-GetDesc disabled, but category-stable depends on that." fi - if test "$enable_fltlib_FilterLoad" -gt 1; then - abort "Patchset fltlib-FilterLoad disabled, but category-stable depends on that." - fi if test "$enable_fonts_Missing_Fonts" -gt 1; then abort "Patchset fonts-Missing_Fonts disabled, but category-stable depends on that." fi @@ -1548,7 +1541,6 @@ if test "$enable_category_stable" -eq 1; then enable_ddraw_EnumSurfaces=1 enable_dinput_Events=1 enable_dxgi_GetDesc=1 - enable_fltlib_FilterLoad=1 enable_fonts_Missing_Fonts=1 enable_gdi32_MaxPixelFormats=1 enable_gdiplus_GdipCreateEffect=1 @@ -2008,6 +2000,23 @@ if test "$enable_Staging" -eq 1; then ) >> "$patchlist" fi +# Patchset server-Misc_ACL +# | +# | This patchset fixes the following Wine bugs: +# | * [#15980] GetSecurityInfo returns NULL DACL for process object +# | +# | Modified files: +# | * dlls/advapi32/tests/security.c, server/process.c, server/security.h, server/token.c +# | +if test "$enable_server_Misc_ACL" -eq 1; then + patch_apply server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch + patch_apply server-Misc_ACL/0002-server-Add-default-security-descriptor-DACL-for-proc.patch + ( + echo '+ { "Erich E. Hoover", "server: Add default security descriptor ownership for processes.", 1 },'; + echo '+ { "Erich E. Hoover", "server: Add default security descriptor DACL for processes.", 1 },'; + ) >> "$patchlist" +fi + # Patchset server-CreateProcess_ACLs # | # | This patchset fixes the following Wine bugs: @@ -2027,23 +2036,6 @@ if test "$enable_server_CreateProcess_ACLs" -eq 1; then ) >> "$patchlist" fi -# Patchset server-Misc_ACL -# | -# | This patchset fixes the following Wine bugs: -# | * [#15980] GetSecurityInfo returns NULL DACL for process object -# | -# | Modified files: -# | * dlls/advapi32/tests/security.c, server/process.c, server/security.h, server/token.c -# | -if test "$enable_server_Misc_ACL" -eq 1; then - patch_apply server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch - patch_apply server-Misc_ACL/0002-server-Add-default-security-descriptor-DACL-for-proc.patch - ( - echo '+ { "Erich E. Hoover", "server: Add default security descriptor ownership for processes.", 1 },'; - echo '+ { "Erich E. Hoover", "server: Add default security descriptor DACL for processes.", 1 },'; - ) >> "$patchlist" -fi - # Patchset advapi32-LsaLookupSids # | # | Modified files: @@ -2687,21 +2679,6 @@ if test "$enable_dxva2_Video_Decoder" -eq 1; then ) >> "$patchlist" fi -# Patchset fltlib-FilterLoad -# | -# | This patchset fixes the following Wine bugs: -# | * [#38435] Add stub for fltlib.FilterLoad -# | -# | Modified files: -# | * dlls/fltlib/fltlib.c, dlls/fltlib/fltlib.spec -# | -if test "$enable_fltlib_FilterLoad" -eq 1; then - patch_apply fltlib-FilterLoad/0001-fltlib-Add-stub-for-FilterLoad.patch - ( - echo '+ { "Michael Müller", "fltlib: Add stub for FilterLoad.", 1 },'; - ) >> "$patchlist" -fi - # Patchset fltmgr-Stub_SYS # | # | This patchset fixes the following Wine bugs: @@ -5655,32 +5632,26 @@ fi # | * [#28911] Add HTTP Host header in HttpSendRequest instead of HttpOpenRequest # | # | Modified files: -# | * dlls/rpcrt4/rpc_transport.c, dlls/wininet/http.c, dlls/wininet/tests/http.c +# | * dlls/wininet/http.c, dlls/wininet/tests/http.c # | if test "$enable_wininet_Cleanup" -eq 1; then patch_apply wininet-Cleanup/0001-wininet-tests-Add-more-tests-for-cookies.patch - patch_apply wininet-Cleanup/0002-wininet-tests-Add-tests-for-overriding-host-header.patch - patch_apply wininet-Cleanup/0003-wininet-tests-Test-auth-credential-reusage-with-host.patch - patch_apply wininet-Cleanup/0004-wininet-tests-Check-cookie-behaviour-when-overriding.patch - patch_apply wininet-Cleanup/0005-wininet-Use-request-server-name-when-processing-cook.patch - patch_apply wininet-Cleanup/0006-wininet-Delay-setting-the-http-host-header.patch - patch_apply wininet-Cleanup/0007-wininet-Use-request-server-canon_host_port-in-authen.patch - patch_apply wininet-Cleanup/0008-wininet-Use-request-server-canon_host_port-when-quer.patch - patch_apply wininet-Cleanup/0009-rpcrt4-Fix-arguments-of-HttpAddRequestHeaders.patch - patch_apply wininet-Cleanup/0010-wininet-Fix-arguments-of-HttpAddRequestHeaders.patch - patch_apply wininet-Cleanup/0011-wininet-Strip-filename-if-no-path-is-set-in-cookie.patch - patch_apply wininet-Cleanup/0012-wininet-Replacing-header-fields-should-fail-if-they-.patch + patch_apply wininet-Cleanup/0002-wininet-tests-Test-auth-credential-reusage-with-host.patch + patch_apply wininet-Cleanup/0003-wininet-tests-Check-cookie-behaviour-when-overriding.patch + patch_apply wininet-Cleanup/0004-wininet-Use-request-server-name-when-processing-cook.patch + patch_apply wininet-Cleanup/0005-wininet-Delay-setting-the-http-host-header.patch + patch_apply wininet-Cleanup/0006-wininet-Use-request-server-canon_host_port-in-authen.patch + patch_apply wininet-Cleanup/0007-wininet-Use-request-server-canon_host_port-when-quer.patch + patch_apply wininet-Cleanup/0008-wininet-Strip-filename-if-no-path-is-set-in-cookie.patch + patch_apply wininet-Cleanup/0009-wininet-Replacing-header-fields-should-fail-if-they-.patch ( echo '+ { "Michael Müller", "wininet/tests: Add more tests for cookies.", 1 },'; - echo '+ { "Michael Müller", "wininet/tests: Add tests for overriding host header.", 1 },'; echo '+ { "Michael Müller", "wininet/tests: Test auth credential reusage with host override.", 1 },'; echo '+ { "Michael Müller", "wininet/tests: Check cookie behaviour when overriding host.", 1 },'; echo '+ { "Michael Müller", "wininet: Use request->server->name when processing cookies instead of Host header field.", 1 },'; echo '+ { "Michael Müller", "wininet: Delay setting the http host header.", 1 },'; echo '+ { "Michael Müller", "wininet: Use request->server->canon_host_port in authentication process.", 1 },'; echo '+ { "Michael Müller", "wininet: Use request->server->canon_host_port when querying for INTERNET_OPTION_URL.", 1 },'; - echo '+ { "Michael Müller", "rpcrt4: Fix arguments of HttpAddRequestHeaders.", 1 },'; - echo '+ { "Michael Müller", "wininet: Fix arguments of HttpAddRequestHeaders.", 1 },'; echo '+ { "Michael Müller", "wininet: Strip filename if no path is set in cookie.", 1 },'; echo '+ { "Michael Müller", "wininet: Replacing header fields should fail if they do not exist yet.", 1 },'; ) >> "$patchlist" diff --git a/patches/wininet-Cleanup/0001-wininet-tests-Add-more-tests-for-cookies.patch b/patches/wininet-Cleanup/0001-wininet-tests-Add-more-tests-for-cookies.patch index 9bb8e692..2c1f96d5 100644 --- a/patches/wininet-Cleanup/0001-wininet-tests-Add-more-tests-for-cookies.patch +++ b/patches/wininet-Cleanup/0001-wininet-tests-Add-more-tests-for-cookies.patch @@ -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?= 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 diff --git a/patches/wininet-Cleanup/0002-wininet-tests-Add-tests-for-overriding-host-header.patch b/patches/wininet-Cleanup/0002-wininet-tests-Add-tests-for-overriding-host-header.patch deleted file mode 100644 index f1f9dfa8..00000000 --- a/patches/wininet-Cleanup/0002-wininet-tests-Add-tests-for-overriding-host-header.patch +++ /dev/null @@ -1,160 +0,0 @@ -From 0f294422ff9d63808689d47eddb20945d74d2349 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -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 - diff --git a/patches/wininet-Cleanup/0003-wininet-tests-Test-auth-credential-reusage-with-host.patch b/patches/wininet-Cleanup/0002-wininet-tests-Test-auth-credential-reusage-with-host.patch similarity index 93% rename from patches/wininet-Cleanup/0003-wininet-tests-Test-auth-credential-reusage-with-host.patch rename to patches/wininet-Cleanup/0002-wininet-tests-Test-auth-credential-reusage-with-host.patch index 7daf2efb..6dd9904e 100644 --- a/patches/wininet-Cleanup/0003-wininet-tests-Test-auth-credential-reusage-with-host.patch +++ b/patches/wininet-Cleanup/0002-wininet-tests-Test-auth-credential-reusage-with-host.patch @@ -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?= 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 diff --git a/patches/wininet-Cleanup/0004-wininet-tests-Check-cookie-behaviour-when-overriding.patch b/patches/wininet-Cleanup/0003-wininet-tests-Check-cookie-behaviour-when-overriding.patch similarity index 90% rename from patches/wininet-Cleanup/0004-wininet-tests-Check-cookie-behaviour-when-overriding.patch rename to patches/wininet-Cleanup/0003-wininet-tests-Check-cookie-behaviour-when-overriding.patch index fa1018f5..6d51bf1e 100644 --- a/patches/wininet-Cleanup/0004-wininet-tests-Check-cookie-behaviour-when-overriding.patch +++ b/patches/wininet-Cleanup/0003-wininet-tests-Check-cookie-behaviour-when-overriding.patch @@ -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?= 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 diff --git a/patches/wininet-Cleanup/0005-wininet-Use-request-server-name-when-processing-cook.patch b/patches/wininet-Cleanup/0004-wininet-Use-request-server-name-when-processing-cook.patch similarity index 100% rename from patches/wininet-Cleanup/0005-wininet-Use-request-server-name-when-processing-cook.patch rename to patches/wininet-Cleanup/0004-wininet-Use-request-server-name-when-processing-cook.patch diff --git a/patches/wininet-Cleanup/0006-wininet-Delay-setting-the-http-host-header.patch b/patches/wininet-Cleanup/0005-wininet-Delay-setting-the-http-host-header.patch similarity index 87% rename from patches/wininet-Cleanup/0006-wininet-Delay-setting-the-http-host-header.patch rename to patches/wininet-Cleanup/0005-wininet-Delay-setting-the-http-host-header.patch index 416c0ebe..127a0e27 100644 --- a/patches/wininet-Cleanup/0006-wininet-Delay-setting-the-http-host-header.patch +++ b/patches/wininet-Cleanup/0005-wininet-Delay-setting-the-http-host-header.patch @@ -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?= 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 diff --git a/patches/wininet-Cleanup/0007-wininet-Use-request-server-canon_host_port-in-authen.patch b/patches/wininet-Cleanup/0006-wininet-Use-request-server-canon_host_port-in-authen.patch similarity index 100% rename from patches/wininet-Cleanup/0007-wininet-Use-request-server-canon_host_port-in-authen.patch rename to patches/wininet-Cleanup/0006-wininet-Use-request-server-canon_host_port-in-authen.patch diff --git a/patches/wininet-Cleanup/0008-wininet-Use-request-server-canon_host_port-when-quer.patch b/patches/wininet-Cleanup/0007-wininet-Use-request-server-canon_host_port-when-quer.patch similarity index 85% rename from patches/wininet-Cleanup/0008-wininet-Use-request-server-canon_host_port-when-quer.patch rename to patches/wininet-Cleanup/0007-wininet-Use-request-server-canon_host_port-when-quer.patch index 2e31008e..bb09c197 100644 --- a/patches/wininet-Cleanup/0008-wininet-Use-request-server-canon_host_port-when-quer.patch +++ b/patches/wininet-Cleanup/0007-wininet-Use-request-server-canon_host_port-when-quer.patch @@ -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?= 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 diff --git a/patches/wininet-Cleanup/0011-wininet-Strip-filename-if-no-path-is-set-in-cookie.patch b/patches/wininet-Cleanup/0008-wininet-Strip-filename-if-no-path-is-set-in-cookie.patch similarity index 84% rename from patches/wininet-Cleanup/0011-wininet-Strip-filename-if-no-path-is-set-in-cookie.patch rename to patches/wininet-Cleanup/0008-wininet-Strip-filename-if-no-path-is-set-in-cookie.patch index da34d531..74751a9b 100644 --- a/patches/wininet-Cleanup/0011-wininet-Strip-filename-if-no-path-is-set-in-cookie.patch +++ b/patches/wininet-Cleanup/0008-wininet-Strip-filename-if-no-path-is-set-in-cookie.patch @@ -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?= 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 diff --git a/patches/wininet-Cleanup/0009-rpcrt4-Fix-arguments-of-HttpAddRequestHeaders.patch b/patches/wininet-Cleanup/0009-rpcrt4-Fix-arguments-of-HttpAddRequestHeaders.patch deleted file mode 100644 index 60ae9439..00000000 --- a/patches/wininet-Cleanup/0009-rpcrt4-Fix-arguments-of-HttpAddRequestHeaders.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 109b633fe845cab2b8abfe4a161ecb0e41ba4e86 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -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 - diff --git a/patches/wininet-Cleanup/0012-wininet-Replacing-header-fields-should-fail-if-they-.patch b/patches/wininet-Cleanup/0009-wininet-Replacing-header-fields-should-fail-if-they-.patch similarity index 97% rename from patches/wininet-Cleanup/0012-wininet-Replacing-header-fields-should-fail-if-they-.patch rename to patches/wininet-Cleanup/0009-wininet-Replacing-header-fields-should-fail-if-they-.patch index 0b0905de..1a1bf184 100644 --- a/patches/wininet-Cleanup/0012-wininet-Replacing-header-fields-should-fail-if-they-.patch +++ b/patches/wininet-Cleanup/0009-wininet-Replacing-header-fields-should-fail-if-they-.patch @@ -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?= 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 diff --git a/patches/wininet-Cleanup/0010-wininet-Fix-arguments-of-HttpAddRequestHeaders.patch b/patches/wininet-Cleanup/0010-wininet-Fix-arguments-of-HttpAddRequestHeaders.patch deleted file mode 100644 index 73ef5e41..00000000 --- a/patches/wininet-Cleanup/0010-wininet-Fix-arguments-of-HttpAddRequestHeaders.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 60e158b648b47ce743f5ceabdad0354324ee7391 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -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 -