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@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2020-08-12 14:09:56 +02:00 committed by Alexandre Julliard
parent e03d7ca900
commit c474c1ab3f
2 changed files with 31 additions and 5 deletions

View file

@ -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 {

View file

@ -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) {