Commit 60195ff6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

itss: Fixed fragment part handling in IInternetProtocolInfo::CombineUrl.

parent fa53a8cc
...@@ -469,7 +469,9 @@ static HRESULT WINAPI ITSProtocolInfo_CombineUrl(IInternetProtocolInfo *iface, ...@@ -469,7 +469,9 @@ static HRESULT WINAPI ITSProtocolInfo_CombineUrl(IInternetProtocolInfo *iface,
if(strchrW(pwzRelativeUrl, ':')) if(strchrW(pwzRelativeUrl, ':'))
return STG_E_INVALIDNAME; return STG_E_INVALIDNAME;
if(pwzRelativeUrl[0] != '/') { if(pwzRelativeUrl[0] == '#') {
base_end += strlenW(base_end);
}else if(pwzRelativeUrl[0] != '/') {
ptr = strrchrW(base_end, '/'); ptr = strrchrW(base_end, '/');
if(ptr) if(ptr)
base_end = ptr+1; base_end = ptr+1;
......
...@@ -483,6 +483,12 @@ static const struct { ...@@ -483,6 +483,12 @@ static const struct {
{"mk:@MSITStore:test.chm::/dir/blank.html", "test.html", 0, S_OK, "mk:@MSITStore:test.chm::/dir/test.html"}, {"mk:@MSITStore:test.chm::/dir/blank.html", "test.html", 0, S_OK, "mk:@MSITStore:test.chm::/dir/test.html"},
{"xxx:test.chm::/dir/blank.html", "test.html", 0, INET_E_USE_DEFAULT_PROTOCOLHANDLER, NULL}, {"xxx:test.chm::/dir/blank.html", "test.html", 0, INET_E_USE_DEFAULT_PROTOCOLHANDLER, NULL},
{"its:test.chm::/dir/blank.html", "/test.html", 0, S_OK, "its:test.chm::/test.html"}, {"its:test.chm::/dir/blank.html", "/test.html", 0, S_OK, "its:test.chm::/test.html"},
{"its:test.chm::/blank.html", "#frag", 0, S_OK, "its:test.chm::/blank.html#frag"},
{"its:test.chm::/blank.html#hash", "#frag", 0, S_OK, "its:test.chm::/blank.html#hash#frag"},
{"its:test.chm::/blank.html", "test.html#frag", 0, S_OK, "its:test.chm::/test.html#frag"},
{"its:test.chm::/blank.html", "/test.html#frag", 0, S_OK, "its:test.chm::/test.html#frag"},
{"its:test.chm::/blank.html", "?query", 0, S_OK, "its:test.chm::/?query"},
{"its:test.chm::/blank.html#frag/blank", "test.html", 0, S_OK, "its:test.chm::/blank.html#frag/test.html"},
}; };
static void test_its_protocol_info(IInternetProtocol *protocol) static void test_its_protocol_info(IInternetProtocol *protocol)
......
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