Skip to content

CURLOPT_PROXY: IPv6 address without port #415

@MarcelRaad

Description

@MarcelRaad

The following code doesn't work:

curl_easy_setopt(easy_handle, CURLOPT_PROXY, "2a00:fac0:a000::7:13");
curl_easy_setopt(easy_handle, CURLOPT_PROXYPORT, 8080L);

url.c:parse_proxy sets the proxy name to "2a00" and overrides the port with 0, as it tries to parse "fac0:a000::7:13" as a port number. Is this a bug or expected behavior?

Unfortunately the documentation at http://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html doesn't mention if IPv6 addresses have to be in square brackets even if they don't contain a port number or a scheme. If so, probably the documentation should reflect that and parse_proxy should return an error if the port string is invalid.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions