cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Getting multiple Host: headers

From: Seshubabu Pasam <pasam_at_seshubabu.com>
Date: Mon, 21 Jun 2004 19:03:44 -0700

With 7.12.0 this seems to be working fine. Is there any particular
reason why you want to overwrite the Host header?

Regards
-Seshubabu Pasam

M. Brian Akins wrote:
> 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