cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Getting multiple Host: headers

From: codemastr <codemstr_at_ptd.net>
Date: Mon, 21 Jun 2004 18:07:29 -0400

> GET /world HTTP/1.1\r\nHost: cnnsquid6\r\nPragma: no-cache\r\nAccept:

Taking a guess here, but that seems like it is from a proxy server. I'm
assuming this based on the fact that there is a proxy server called "squid".

-- codemastr

----- Original Message -----
From: "M. Brian Akins" <bakins_at_web.turner.com>
To: <curl-library_at_cool.haxx.se>
Sent: Monday, June 21, 2004 3:37 PM
Subject: Getting multiple Host: headers

> I have basically this:
>
> curl_list = curl_slist_append(curl_list, value);
>
> where value is something like: "Host: bakinsu"
>
> and then,
> curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, curl_list);
>
> Using debug functions, this is what I am seeing (watch for wrap):
>
> GET /world HTTP/1.1\r\nHost: cnnsquid6\r\nPragma: no-cache\r\nAccept:
> */*\r\nUser-Agent: curl/7.11.2 (i386-pc-linux-gnu) libcurl/7.11.2
> OpenSSL/0.9.7d ipv6 zlib/1.2.1.1\r\nHost: bakinsu\r\n\r\n
>
> I now have two Host: headers. What is strange is that occasionally it
works
> as I would expect it
>
> Thanks,
>
> Brian Akins
> CNN Internet Operations.
>
>
Received on 2004-06-22