cURL / Mailing Lists / curl-library / Single Mail

curl-library

Getting multiple Host: headers

From: M. Brian Akins <bakins_at_web.turner.com>
Date: Mon, 21 Jun 2004 15:37:07 -0400

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-21