cURL / Mailing Lists / curl-library / Single Mail


RE: [bagder/curl] 219a0f: remote_port: allow connect to port 0

From: Steve Holme <>
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"
> 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:
* Hostname was NOT found in DNS cache
* Trying
* Trying
* connect to port 1 failed: Timed out

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 ?


List admin:
Received on 2014-03-05