Alex Henrie : urlmon: Call parse_host in combine_uri to set related parse_data fields.
Alexandre Julliard
julliard at winehq.org
Tue Nov 10 13:46:23 CST 2020
Module: wine
Branch: stable
Commit: 318a68b03016e2bca2c59f8ea72540dab24729ad
URL: https://source.winehq.org/git/wine.git/?a=commit;h=318a68b03016e2bca2c59f8ea72540dab24729ad
Author: Alex Henrie <alexhenrie24 at gmail.com>
Date: Wed Aug 12 14:09:56 2020 +0200
urlmon: Call parse_host in combine_uri to set related parse_data fields.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49662
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit c474c1ab3f698ffefa7ff779061620f3af63a69e)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/urlmon/tests/uri.c | 29 ++++++++++++++++++++++++++++-
dlls/urlmon/uri.c | 7 +++----
2 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c
index 29a70ad4813..b1390a35bf4 100644
--- a/dlls/urlmon/tests/uri.c
+++ b/dlls/urlmon/tests/uri.c
@@ -7595,7 +7595,34 @@ static const uri_combine_test uri_combine_tests[] = {
{URL_SCHEME_MAILTO,S_OK},
{URLZONE_INVALID,E_NOTIMPL}
}
- }
+ },
+ { "http://[::1]",0,
+ "/",Uri_CREATE_ALLOW_RELATIVE,
+ 0,S_OK,FALSE,
+ {
+ {"http://[::1]/",S_OK},
+ {"[::1]",S_OK},
+ {"http://[::1]/",S_OK},
+ {"",S_FALSE},
+ {"",S_FALSE},
+ {"",S_FALSE},
+ {"::1",S_OK},
+ {"",S_FALSE},
+ {"/",S_OK},
+ {"/",S_OK},
+ {"",S_FALSE},
+ {"http://[::1]/",S_OK},
+ {"http",S_OK},
+ {"",S_FALSE},
+ {"",S_FALSE}
+ },
+ {
+ {Uri_HOST_IPV6,S_OK},
+ {80,S_OK,FALSE,TRUE},
+ {URL_SCHEME_HTTP,S_OK},
+ {URLZONE_INVALID,E_NOTIMPL}
+ }
+ },
};
typedef struct _uri_parse_test {
diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c
index bec7ce16a59..7f5dc155027 100644
--- a/dlls/urlmon/uri.c
+++ b/dlls/urlmon/uri.c
@@ -3387,7 +3387,7 @@ static HRESULT canonicalize_uri(const parse_data *data, Uri *uri, DWORD flags) {
uri->scheme_type = data->scheme_type;
if(!canonicalize_hierpart(data, uri, flags, FALSE)) {
- ERR("(%p %p %x): Unable to canonicalize the heirpart of the URI\n", data, uri, flags);
+ ERR("(%p %p %x): Unable to canonicalize the hierpart of the URI\n", data, uri, flags);
return E_INVALIDARG;
}
@@ -6512,9 +6512,8 @@ static HRESULT combine_uri(Uri *base, Uri *relative, DWORD flags, IUri **result,
}
if(proc_uri->host_start > -1) {
- data.host = proc_uri->canon_uri+proc_uri->host_start;
- data.host_len = proc_uri->host_len;
- data.host_type = proc_uri->host_type;
+ const WCHAR *host = proc_uri->canon_uri+proc_uri->host_start;
+ parse_host(&host, &data, 0);
}
if(proc_uri->has_port) {
More information about the wine-cvs
mailing list