cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Antw:make curl connect to a given IP/vhost?

From: Tomasz Chmielewski <mangoo_at_wpkg.org>
Date: Tue, 07 Sep 2010 18:01:19 +0200

On 07.09.2010 17:46, Alex Bligh wrote:
>
>
> --On 7 September 2010 17:42:09 +0200 NIJSSEN <kees.nijssen_at_quicknet.nl>
> wrote:
>
>> curl <options> 1.1.1.1 or curl <options> 2.2.2.2
>
> That is what he wants, I think, but it won't send the right http1.1 GET
> line.
>
> You might be able to use -x to set a proxy, and hope it works, but
> failing that modifying /etc/hosts or doing an ldpreload for gethostbyname
> is the only way I can think of without modifying the source code.

wget folks gave me a tip how it can be used with wget:

wget http://1.1.1.1/ --header 'Host: www.example.com'

So, curl's equivalent would be:

-H/--header

-- 
Tomasz Chmielewski
http://wpkg.org
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-07