mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-29 17:31:07 +00:00
[Network] Fix relative URL path starting with multiple slashes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user