resolve: allow IP address within [] brackets

... so that IPv6 addresses can be passed like they can for connect-to
and how they're used in URLs.

Added test 1324 to verify
Reported-by: Alex Malinovich

Fixes #2087
Closes #2091
This commit is contained in:
Daniel Stenberg 2017-11-17 11:21:12 +01:00
parent 6ce9845677
commit 715f1f53e0
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 74 additions and 3 deletions

View file

@ -14,4 +14,6 @@ different ports.
The provided address set by this option will be used even if --ipv4 or --ipv6
is set to make curl use another IP version.
Support for providing the IP address within [brackets] was added in 7.57.0.
This option can be used many times to add many host names to resolve.

View file

@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@ -55,6 +55,8 @@ Remove names from the DNS cache again, to stop providing these fake resolves,
by including a string in the linked list that uses the format
\&"-HOST:PORT". The host name must be prefixed with a dash, and the host name
and port number must exactly match what was already added previously.
Support for providing the ADDRESS within [brackets] was added in 7.57.0.
.SH DEFAULT
NULL
.SH PROTOCOLS