Commit ebf9f12c authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Make sure to include query part of relative URI containing path in combine_uri.

parent 2e46c671
......@@ -6078,6 +6078,87 @@ static const uri_combine_test uri_combine_tests[] = {
{URL_SCHEME_FILE,S_OK},
{URLZONE_INVALID,E_NOTIMPL}
}
},
{ "http://winehq.org/dir/testfile",0,
"test?querystring",Uri_CREATE_ALLOW_RELATIVE,
0,S_OK,FALSE,
{
{"http://winehq.org/dir/test?querystring",S_OK},
{"winehq.org",S_OK},
{"http://winehq.org/dir/test?querystring",S_OK},
{"winehq.org",S_OK},
{"",S_FALSE},
{"",S_FALSE},
{"winehq.org",S_OK},
{"",S_FALSE},
{"/dir/test",S_OK},
{"/dir/test?querystring",S_OK},
{"?querystring",S_OK},
{"http://winehq.org/dir/test?querystring",S_OK},
{"http",S_OK},
{"",S_FALSE},
{"",S_FALSE}
},
{
{Uri_HOST_DNS,S_OK},
{80,S_OK},
{URL_SCHEME_HTTP,S_OK},
{URLZONE_INVALID,E_NOTIMPL}
}
},
{ "http://winehq.org/dir/test",0,
"test?querystring",Uri_CREATE_ALLOW_RELATIVE,
0,S_OK,FALSE,
{
{"http://winehq.org/dir/test?querystring",S_OK},
{"winehq.org",S_OK},
{"http://winehq.org/dir/test?querystring",S_OK},
{"winehq.org",S_OK},
{"",S_FALSE},
{"",S_FALSE},
{"winehq.org",S_OK},
{"",S_FALSE},
{"/dir/test",S_OK},
{"/dir/test?querystring",S_OK},
{"?querystring",S_OK},
{"http://winehq.org/dir/test?querystring",S_OK},
{"http",S_OK},
{"",S_FALSE},
{"",S_FALSE}
},
{
{Uri_HOST_DNS,S_OK},
{80,S_OK},
{URL_SCHEME_HTTP,S_OK},
{URLZONE_INVALID,E_NOTIMPL}
}
},
{ "http://winehq.org/dir/test?querystring",0,
"#hash",Uri_CREATE_ALLOW_RELATIVE,
0,S_OK,FALSE,
{
{"http://winehq.org/dir/test?querystring#hash",S_OK},
{"winehq.org",S_OK},
{"http://winehq.org/dir/test?querystring#hash",S_OK},
{"winehq.org",S_OK},
{"",S_FALSE},
{"#hash",S_OK},
{"winehq.org",S_OK},
{"",S_FALSE},
{"/dir/test",S_OK},
{"/dir/test?querystring",S_OK},
{"?querystring",S_OK},
{"http://winehq.org/dir/test?querystring#hash",S_OK},
{"http",S_OK},
{"",S_FALSE},
{"",S_FALSE}
},
{
{Uri_HOST_DNS,S_OK},
{80,S_OK},
{URL_SCHEME_HTTP,S_OK},
{URLZONE_INVALID,E_NOTIMPL}
}
}
};
......
......@@ -6006,6 +6006,11 @@ static HRESULT combine_uri(Uri *base, Uri *relative, DWORD flags, IUri **result,
}
}
if(relative->query_start > -1) {
data.query = relative->canon_uri+relative->query_start;
data.query_len = relative->query_len;
}
/* Make sure the path component is valid. */
ptr = path;
pptr = &ptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment