cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl 7.2.1 patch to specify http request output port

From: Stephen Kick <skick_at_epicrealm.com>
Date: Fri, 15 Sep 2000 15:40:40 -0500

Last week I posted a patch to enable you to specify the interface to use for
http
requests. It did not look like the email went through so I will describe
the patch again to see if anyone wants it. If anyone wants it let me know
on here and I will post the patch.

I have patched curl version 7.2.1 to be able to specify which network device
to use for outputing http requests.
The interface may be a second ethernet port or a aliased ip
address. For example:
Get a web page from a server using a specified port
for the interface:

curl --interface eth0:1 http://www.netscape.com/

or

curl --interface 192.168.1.10 http://www.netscape.com/

or

curl --interface eth1 http://www.netscape.com/

The patch binds the port to the specified interface so that http requests
are sent out the specified interface and the results will be returned to
that interface. The patch works for HTTP and HTTPS.
  
The patch adds the "--interface" command syntax to support specification
of the interface to use.

The patch has only been tested with RedHat 6.2, x86. I do not know how it
will work on other architectures. Someone needs to check the errno's I am
checking in case they are not supported on other architectures. I have
updated some of the documentation to describe the syntax but I have not
updated the man pages.

Enjoy,

Stephen Kick
QA Engineer
skick_at_epicrealm.com

Steve Kick
Operations Sr. QA Engr
Received on 2000-09-15