urlapi: remove superfluous host name check

... as it is checked later more proper.

Closes #11195
This commit is contained in:
Daniel Stenberg 2023-05-24 13:50:25 +02:00
parent 5c58cb0212
commit 6375a65433
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 7 additions and 6 deletions

View file

@ -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;