From 0bc4938eecccefdf8906bf9c488e4cd9c8467e99 Mon Sep 17 00:00:00 2001 From: Paul Marks Date: Sun, 30 Mar 2014 07:50:37 +0200 Subject: curl: stop interpreting IPv6 literals as glob patterns. This makes it possible to fetch from an IPv6 literal without specifying the -g option. Globbing remains available elsehwere in the URL. For example: curl http://[::1]/file[1-3].txt This creates no ambiguity, because there is no overlap between the syntax of valid globs and valid IPv6 literals. Globs contain hyphens and at most 1 colon, while IPv6 literals have no hyphens, and at least 2 colons. The peek_ipv6() parser simply whitelists a set of characters and counts colons, because the real validation happens later on. The character set includes A-Z, in case someone decides to implement support for scopes like [fe80::1%25eth0] in the future. Signed-off-by: Paul Marks --- tests/data/test1230 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/data') diff --git a/tests/data/test1230 b/tests/data/test1230 index b16269d2d..3c1d3d448 100644 --- a/tests/data/test1230 +++ b/tests/data/test1230 @@ -56,7 +56,7 @@ HTTP CONNECT to IPv6 numerical address # 0x4ce == 1230, the test number --g http://[1234:1234:1234::4ce]:%HTTPPORT/wanted/page/1230 -p -x %HOSTIP:%HTTPPORT +http://[1234:1234:1234::4ce]:%HTTPPORT/wanted/page/1230 -p -x %HOSTIP:%HTTPPORT -- cgit v1.2.3