-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff7fa75
commit 0bcd820
Showing
4 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -262,9 +262,9 @@ relative( | |
} | ||
else if (*it1 == dotdot) | ||
{ | ||
++it1; | ||
if (it0 != begin0) | ||
--it0; | ||
++it1; | ||
} | ||
else | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2087,14 +2087,18 @@ class url_test | |
// relative URL / absolute paths | ||
check("/a/path/to/somewhere/else", "/a/path/to/a", "../a"); | ||
check("/relative/sub/foo/sub/file", "/relative/path", "../../../path"); | ||
// resolve authority | ||
check("http://google.com/baz", "http://example.org/world.html", "//example.org/world.html"); | ||
check("http://google.com/baz", "http://example.org/world.html?q#f", "//example.org/world.html?q#f"); | ||
check("http://google.com/baz", "http:/world.html", "/world.html"); | ||
check("http://www.example.com:8080/dir/file", "http://www.example.com:8080/dir/file", ""); | ||
check("http://www.example.com:8080/dir/file", "http://www.example.com:8080/dir/file?foo=bar#abcd", "?foo=bar#abcd"); | ||
// "." should be ignored | ||
check("/a/path/././to/./somewhere/else", "/a/./path/./to/a", "../a"); | ||
// ".." should be normalized | ||
check("/a/path/x/../to/y/../somewhere/else", "/b/../a/path/to/a", "../a"); | ||
// check("/../path/x/../to/y/../somewhere/else", "/a/../../path/to/a", "../a"); | ||
check("/a/path/to/somewhere/else", "/a/path/to/a/../b", "../b"); | ||
// same parent | ||
check("/relative/file?some=query#hash", "/relative/path?blubber=1#hash1", "path?blubber=1#hash1"); | ||
// direct parent | ||
|
@@ -2297,6 +2301,7 @@ class url_test | |
check("http://cppalliance.org/%2E%2E/./b/b/c/./../../g", "http://cppalliance.org/../a/g", +1); | ||
check("http://[email protected]", "http://[email protected]", -1); | ||
check("http://alice:[email protected]", "http://alice:[email protected]", 1); | ||
check("http://[email protected]", "http://alice:[email protected]", -1); | ||
check("http://alice:[email protected]", "http://alice:[email protected]", -1); | ||
check("http://cppalliance.org", "http://cppalliance.org:81", -1); | ||
check("http://cppalliance.org:80", "http://cppalliance.org:81", -1); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1117,7 +1117,6 @@ class url_view_test | |
testOutput(); | ||
testCases(); | ||
testRelativePart(); | ||
|
||
testParseOriginForm(); | ||
} | ||
}; | ||
|