curl-library
RE: [bagder/curl] 219a0f: remote_port: allow connect to port 0
Date: Wed, 5 Mar 2014 21:21:53 +0000
On Wed, 5 Mar 2014, Frank Gevaerts wrote:
> I don't know if there are ways to abuse this, but on my (64 bit)
> system, "curl http://www.google.com:-18446744073709551536/"
> behaves as if it were port 80.
Interesting... Is that because it is < 0?
However... If I run things here on Win64...
A) And perform:
I get:
curl: (3) Port number too large: 4294967241
But at least that is consistent with v7.35.
B) And if I do:
I get:
curl: (3) Port number too large: 99999
Which is good ;-)
C) But if I use your example curl appears to lock up. So if I then use
--verbose and get:
* Rebuilt URL to: http://www.google.com:-184467440737095515
* Hostname was NOT found in DNS cache
* Trying 173.194.34.178...
* Trying 173.194.34.179...
* connect to 173.194.34.178 port 1 failed: Timed out
[cut]
Although this seems consistent with v7.35.0.
However, is it possible to set the port to something large via
curl_easy_setopt(CURLOPT_PORT, 99999) for example as that is a "long"
argument ?
Cheers
Steve
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-03-05