cURL / Mailing Lists / curl-library / Single Mail


Getting multiple Host: headers

From: M. Brian Akins <>
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/\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


Brian Akins
CNN Internet Operations.
Received on 2004-06-21