mirror of
https://github.com/curl/curl.git
synced 2026-07-26 03:27:17 +03:00
urlapi: drop base fragment on empty redirect
Extended test 1560 to verify Fixes #21745 Closes #21763
This commit is contained in:
parent
4ff212f8ed
commit
780ccb256e
3 changed files with 33 additions and 3 deletions
|
|
@ -37,7 +37,7 @@ lib%TESTNUMBER
|
|||
success
|
||||
</stdout>
|
||||
<limits>
|
||||
Allocations: 3200
|
||||
Allocations: 3250
|
||||
</limits>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
|
|
|||
|
|
@ -1356,6 +1356,33 @@ static const struct redircase set_url_list[] = {
|
|||
"", /* blank redirect */
|
||||
"https://example.com/",
|
||||
0, 0, CURLUE_OK },
|
||||
{"file:///test?test#test",
|
||||
"", "file:///test?test",
|
||||
0, 0, CURLUE_OK},
|
||||
{"https://example.com/path?query#frag",
|
||||
"", "https://example.com/path?query",
|
||||
0, 0, CURLUE_OK},
|
||||
{"ftp://example.com/dir/file#anchor",
|
||||
"", "ftp://example.com/dir/file",
|
||||
0, 0, CURLUE_OK},
|
||||
{"http://example.com/path#frag",
|
||||
"", "http://example.com/path",
|
||||
0, 0, CURLUE_OK},
|
||||
{"http://example.com/#frag",
|
||||
"", "http://example.com/",
|
||||
0, 0, CURLUE_OK},
|
||||
{"http://user:pass@example.com/path?query#frag",
|
||||
"", "http://user:pass@example.com/path?query",
|
||||
0, 0, CURLUE_OK},
|
||||
{"http://example.com:8080/path?query#frag",
|
||||
"", "http://example.com:8080/path?query",
|
||||
0, 0, CURLUE_OK},
|
||||
{"https://user:pass@example.com:8443/path?query#frag",
|
||||
"", "https://user:pass@example.com:8443/path?query",
|
||||
0, 0, CURLUE_OK},
|
||||
{"http://[::1]/path#frag",
|
||||
"", "http://[::1]/path",
|
||||
0, 0, CURLUE_OK},
|
||||
{"http://firstplace.example.com/want/1314",
|
||||
"//somewhere.example.com/reply/1314",
|
||||
"http://somewhere.example.com/reply/1314",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue