Zebediah Figura : kernelbase: Ignore URL_PARTFLAG_KEEPSCHEME when used with URL_PART_SCHEME or URL_PART_QUERY.

Alexandre Julliard julliard at winehq.org
Mon Feb 14 15:41:29 CST 2022


Module: wine
Branch: master
Commit: 2db68d819183a5c90f1d00b2051e7339d7523291
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2db68d819183a5c90f1d00b2051e7339d7523291

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Sun Feb 13 12:44:00 2022 -0600

kernelbase: Ignore URL_PARTFLAG_KEEPSCHEME when used with URL_PART_SCHEME or URL_PART_QUERY.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernelbase/path.c   | 2 ++
 dlls/shlwapi/tests/url.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c
index 15280a7ea4b..e716351b0bc 100644
--- a/dlls/kernelbase/path.c
+++ b/dlls/kernelbase/path.c
@@ -4334,6 +4334,7 @@ HRESULT WINAPI UrlGetPartW(const WCHAR *url, WCHAR *out, DWORD *out_len, DWORD p
     switch (part)
     {
     case URL_PART_SCHEME:
+        flags &= ~URL_PARTFLAG_KEEPSCHEME;
         if (!pl.scheme_len)
         {
             *out_len = 0;
@@ -4404,6 +4405,7 @@ HRESULT WINAPI UrlGetPartW(const WCHAR *url, WCHAR *out, DWORD *out_len, DWORD p
         break;
 
     case URL_PART_QUERY:
+        flags &= ~URL_PARTFLAG_KEEPSCHEME;
         if (!pl.query_len)
         {
             *out_len = 0;
diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c
index b4b66aec2f1..b2b20b94b1b 100644
--- a/dlls/shlwapi/tests/url.c
+++ b/dlls/shlwapi/tests/url.c
@@ -614,7 +614,7 @@ static void test_UrlGetPart(void)
         {"http://foo:bar@localhost:21/internal.php?query=x&return=y", URL_PART_PORT, 0, S_OK, "21"},
         {"http://foo:bar@localhost:21/internal.php?query=x&return=y", URL_PART_QUERY, 0, S_OK, "query=x&return=y", .todo_result = TRUE},
         {"http://foo:bar@localhost:21/internal.php#anchor", URL_PART_QUERY, 0, S_FALSE, ""},
-        {"http://foo:bar@localhost:21/internal.php?query=x&return=y", URL_PART_SCHEME, URL_PARTFLAG_KEEPSCHEME, S_OK, "http", .todo_result = TRUE},
+        {"http://foo:bar@localhost:21/internal.php?query=x&return=y", URL_PART_SCHEME, URL_PARTFLAG_KEEPSCHEME, S_OK, "http"},
         {"http://foo:bar@localhost:21/internal.php?query=x&return=y", URL_PART_USERNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "http:foo"},
         {"http://foo:bar@localhost:21/internal.php?query=x&return=y", URL_PART_PASSWORD, URL_PARTFLAG_KEEPSCHEME, S_OK, "http:bar"},
         {"http://foo:bar@localhost:21/internal.php?query=x&return=y", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "http:localhost"},




More information about the wine-cvs mailing list