mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
[Network] Fix relative URL path starting with multiple slashes
This commit is contained in:
parent
71ce058b03
commit
d55111c4fd
1 changed files with 9 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue