On Mon, Apr 23, 2012 at 03:12:00PM +0600, Roman Mamedov wrote:
> On Mon, 23 Apr 2012 11:04:02 +0200 (CEST)
> Daniel Stenberg <dan...@haxx.se> wrote:
> 
> > > * About to connect() to 2a02:1788:4fd:cd::c742 port 80 (#0)
> > > *   Trying 2a02:1788:4fd:cd::c742...
> > >
> > > Nothing changed.
> > 
> > It changed drastically. Now it didn't complain on bad globbing. So your 
> > original stated problem was exactly what I pointed to.
> 
> $ curl -v 2a02:1788:4fd:cd::c742:cde2
> * About to connect() to 2a02:1788:4fd:cd::c742 port 80 (#0)
> *   Trying 2a02:1788:4fd:cd::c742...
> ^C
> 
> $ curl -gv 2a02:1788:4fd:cd::c742:cde2
> * About to connect() to 2a02:1788:4fd:cd::c742 port 80 (#0)
> *   Trying 2a02:1788:4fd:cd::c742...
> ^C
> 
> Without the braces it never complains about bad globbing, but always chops
> off the last part of this address (as of version 7.25), which is what the bug
> report is about.
> 
> > You mean you could pass in an illegal URL back then and it happened to 
> > guess 
> > what you meant? If so, that was mostly good luck.
> 
> With the older version:
> 
> # curl --version
> curl 7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 
> libidn/1.15 libssh2/1.2.6
> Protocols: dict file ftp ftps http https imap imaps ldap ldaps pop3 pop3s 
> rtsp scp sftp smtp smtps telnet tftp 
> Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
> 
> It works:
> 
> # curl -v 2a02:1788:4fd:cd::c742:cde2
> * About to connect() to 2a02:1788:4fd:cd::c742:cde2 port 80 (#0)
> *   Trying 2a02:1788:4fd:cd::c742:cde2... connected
> * Connected to 2a02:1788:4fd:cd::c742:cde2 (2a02:1788:4fd:cd::c742:cde2) port 
> 80 (#0)
> [snip]

I can confirm that that address is truncated in v7.25.0 but not v7.21.0.

Similarily, if I try any funny string with ':' in it, curl truncates it too.

In v7.25.0:

> % curl -v 123:231:asd:lol
> * getaddrinfo(3) failed for 123:231:asd:80
> * Couldn't resolve host '123:231:asd'
> * Closing connection #0
> curl: (6) Couldn't resolve host '123:231:asd'

In v7.21.0:

> % curl -v 123:231:asd:lol
> * getaddrinfo(3) failed for 123:231:asd:lol:80
> * Couldn't resolve host '123:231:asd:lol'
> * Closing connection #0
> curl: (6) Couldn't resolve host '123:231:asd:lol'

Cheers

-- 
perl -E '$_=q;$/= @{[@_]};and s;\S+;<inidehG ordnasselA>;eg;say~~reverse'

Attachment: signature.asc
Description: Digital signature

Reply via email to