mirror of
https://github.com/curl/curl.git
synced 2025-02-23 15:10:03 +08:00
urlapi: remove superfluous host name check
... as it is checked later more proper. Closes #11195
This commit is contained in:
parent
5c58cb0212
commit
6375a65433
@ -1724,15 +1724,10 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
|
||||
case CURLUPART_OPTIONS:
|
||||
storep = &u->options;
|
||||
break;
|
||||
case CURLUPART_HOST: {
|
||||
size_t len = strcspn(part, " \r\n");
|
||||
if(strlen(part) != len)
|
||||
/* hostname with bad content */
|
||||
return CURLUE_BAD_HOSTNAME;
|
||||
case CURLUPART_HOST:
|
||||
storep = &u->host;
|
||||
Curl_safefree(u->zoneid);
|
||||
break;
|
||||
}
|
||||
case CURLUPART_ZONEID:
|
||||
storep = &u->zoneid;
|
||||
break;
|
||||
|
@ -697,6 +697,12 @@ static int checkurl(const char *org, const char *url, const char *out)
|
||||
|
||||
/* !checksrc! disable SPACEBEFORECOMMA 1 */
|
||||
static const struct setcase set_parts_list[] = {
|
||||
{"https://example.com/",
|
||||
"host=example.com%2fmoo,",
|
||||
"",
|
||||
0, /* get */
|
||||
0, /* set */
|
||||
CURLUE_OK, CURLUE_BAD_HOSTNAME},
|
||||
{"https://example.com/",
|
||||
"host=http://fake,",
|
||||
"",
|
||||
|
Loading…
Reference in New Issue
Block a user