mirror of
https://github.com/curl/curl.git
synced 2026-07-24 20:37:17 +03:00
urlapi: strip off scope id from numerical IPv6 addresses
... to make the host name "usable". Store the scope id and put it back when extracting a URL out of it. Also makes curl_url_set() syntax check CURLUPART_HOST. Fixes #3817 Closes #3822
This commit is contained in:
parent
0281262819
commit
bdb2dbc103
5 changed files with 192 additions and 12 deletions
|
|
@ -168,7 +168,7 @@ UNITTEST_START
|
|||
u = curl_url();
|
||||
if(!u)
|
||||
goto fail;
|
||||
ipv6port = strdup("[fe80::250:56ff:fea7:da15%!25eth3]:80");
|
||||
ipv6port = strdup("[fe80::250:56ff:fea7:da15!25eth3]:80");
|
||||
if(!ipv6port)
|
||||
goto fail;
|
||||
ret = Curl_parse_port(u, ipv6port);
|
||||
|
|
@ -184,7 +184,7 @@ UNITTEST_START
|
|||
if(!ipv6port)
|
||||
goto fail;
|
||||
ret = Curl_parse_port(u, ipv6port);
|
||||
fail_unless(ret != CURLUE_OK, "Curl_parse_port returned non-error");
|
||||
fail_unless(ret == CURLUE_OK, "Curl_parse_port returned error");
|
||||
fail:
|
||||
free(ipv6port);
|
||||
curl_url_cleanup(u);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue