Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2023-11-24 17:07:26 +08:00
commit b47d46219f
19 changed files with 333 additions and 27 deletions

View file

@ -2541,7 +2541,15 @@ nsStandardURL::Resolve(const nsACString &in, nsACString &out)
// locate result path
resultPath = PL_strstr(result, "://");
if (resultPath) {
resultPath = PL_strchr(resultPath + 3, '/');
// If there are multiple slashes after :// we must ignore them
// otherwise net_CoalesceDirs may think the host is a part of the path.
resultPath += 3;
if (protocol.IsEmpty() && !SegmentIs(mScheme,"file")) {
while (*resultPath == '/') {
resultPath++;
}
}
resultPath = PL_strchr(resultPath, '/');
if (resultPath)
net_CoalesceDirs(coalesceFlag,resultPath);
}