urlmon: Fixed handling URIs with implicit file scheme in CoInternetCombineUrlEx.
This commit is contained in:
parent
96ace8cbcb
commit
79b7c1108e
|
@ -360,6 +360,31 @@ static const uri_properties uri_tests[] = {
|
||||||
{URLZONE_INVALID,E_NOTIMPL,FALSE}
|
{URLZONE_INVALID,E_NOTIMPL,FALSE}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{ "file:///z:/test dir/README.txt", 0, S_OK, FALSE,
|
||||||
|
{
|
||||||
|
{"file:///z:/test%20dir/README.txt",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"file:///z:/test%20dir/README.txt",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{".txt",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"/z:/test%20dir/README.txt",S_OK},
|
||||||
|
{"/z:/test%20dir/README.txt",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"file:///z:/test dir/README.txt",S_OK},
|
||||||
|
{"file",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{Uri_HOST_UNKNOWN,S_OK,FALSE},
|
||||||
|
{0,S_FALSE,FALSE},
|
||||||
|
{URL_SCHEME_FILE,S_OK,FALSE},
|
||||||
|
{URLZONE_INVALID,E_NOTIMPL,FALSE}
|
||||||
|
}
|
||||||
|
},
|
||||||
{ "urn:nothing:should:happen here", 0, S_OK, FALSE,
|
{ "urn:nothing:should:happen here", 0, S_OK, FALSE,
|
||||||
{
|
{
|
||||||
{"urn:nothing:should:happen here",S_OK,FALSE},
|
{"urn:nothing:should:happen here",S_OK,FALSE},
|
||||||
|
@ -6926,7 +6951,62 @@ static const uri_combine_test uri_combine_tests[] = {
|
||||||
{URL_SCHEME_HTTP,S_OK},
|
{URL_SCHEME_HTTP,S_OK},
|
||||||
{URLZONE_INVALID,E_NOTIMPL}
|
{URLZONE_INVALID,E_NOTIMPL}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{ "http://google.com/test",0,
|
||||||
|
"c:\\test\\", Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME,
|
||||||
|
0,S_OK,FALSE,
|
||||||
|
{
|
||||||
|
{"file:///c:/test/",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"file:///c:/test/",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"/c:/test/",S_OK},
|
||||||
|
{"/c:/test/",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"c:\\test\\",S_OK,FALSE,"file:///c:/test/"},
|
||||||
|
{"file",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{Uri_HOST_UNKNOWN,S_OK},
|
||||||
|
{0,S_FALSE},
|
||||||
|
{URL_SCHEME_FILE,S_OK},
|
||||||
|
{URLZONE_INVALID,E_NOTIMPL}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{ "http://google.com/test",0,
|
||||||
|
"c:\\test\\", Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME,
|
||||||
|
0,S_OK,FALSE,
|
||||||
|
{
|
||||||
|
{"file:///c:/test/",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"file:///c:/test/",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"/c:/test/",S_OK},
|
||||||
|
{"/c:/test/",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"c:\\test\\",S_OK,FALSE,"file:///c:/test/"},
|
||||||
|
{"file",S_OK},
|
||||||
|
{"",S_FALSE},
|
||||||
|
{"",S_FALSE}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{Uri_HOST_UNKNOWN,S_OK},
|
||||||
|
{0,S_FALSE},
|
||||||
|
{URL_SCHEME_FILE,S_OK},
|
||||||
|
{URLZONE_INVALID,E_NOTIMPL}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _uri_parse_test {
|
typedef struct _uri_parse_test {
|
||||||
|
|
|
@ -6461,7 +6461,7 @@ static HRESULT combine_uri(Uri *base, Uri *relative, DWORD flags, IUri **result,
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_uri(&data, 0);
|
parse_uri(&data, Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME);
|
||||||
|
|
||||||
hr = Uri_Construct(NULL, (void**)&ret);
|
hr = Uri_Construct(NULL, (void**)&ret);
|
||||||
if(FAILED(hr)) {
|
if(FAILED(hr)) {
|
||||||
|
@ -6800,7 +6800,7 @@ HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DW
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = CreateUri(pwzRelativeUrl, Uri_CREATE_ALLOW_RELATIVE, 0, &relative);
|
hr = CreateUri(pwzRelativeUrl, Uri_CREATE_ALLOW_RELATIVE|Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, 0, &relative);
|
||||||
if(FAILED(hr)) {
|
if(FAILED(hr)) {
|
||||||
*ppCombinedUri = NULL;
|
*ppCombinedUri = NULL;
|
||||||
return hr;
|
return hr;
|
||||||
|
|
Loading…
Reference in New Issue