lib1560: extended to verify detect/reject of unknown schemes
... when no guessing is allowed.
This commit is contained in:
parent
846678541b
commit
c4768f168c
@ -248,7 +248,7 @@ static const struct testcase get_parts_list[] ={
|
||||
CURLU_DEFAULT_SCHEME, 0, CURLUE_NO_HOST},
|
||||
{"boing:80",
|
||||
"https | [11] | [12] | [13] | boing | 80 | / | [16] | [17]",
|
||||
CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
|
||||
CURLU_DEFAULT_SCHEME|CURLU_GUESS_SCHEME, 0, CURLUE_OK},
|
||||
{"http://[fd00:a41::50]:8080",
|
||||
"http | [11] | [12] | [13] | [fd00:a41::50] | 8080 | / | [16] | [17]",
|
||||
CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
|
||||
@ -393,6 +393,15 @@ static const struct testcase get_parts_list[] ={
|
||||
};
|
||||
|
||||
static const struct urltestcase get_url_list[] = {
|
||||
/* unsupported schemes with no guessing enabled */
|
||||
{"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIEhUTUw+PG1ldGEgY",
|
||||
"", 0, 0, CURLUE_UNSUPPORTED_SCHEME},
|
||||
{"d:anything-really", "", 0, 0, CURLUE_UNSUPPORTED_SCHEME},
|
||||
{"about:config", "", 0, 0, CURLUE_UNSUPPORTED_SCHEME},
|
||||
{"example://foo", "", 0, 0, CURLUE_UNSUPPORTED_SCHEME},
|
||||
{"mailto:infobot@example.com?body=send%20current-issue", "", 0, 0,
|
||||
CURLUE_UNSUPPORTED_SCHEME},
|
||||
{"about:80", "https://about:80/", CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
|
||||
/* percent encoded host names */
|
||||
{"http://example.com%40127.0.0.1/", "", 0, 0, CURLUE_BAD_HOSTNAME},
|
||||
{"http://example.com%21127.0.0.1/", "", 0, 0, CURLUE_BAD_HOSTNAME},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user