cURL / Mailing Lists / curl-library / Single Mail

curl-library

Unable to set CURLOPT_HTTP200ALIASES for "ICY 200 OK"

From: <souvik.datta_at_wipro.com>
Date: Mon, 8 Mar 2010 10:24:07 +0530

Hello,
I am using libcurl/7.18.2 on Ubuntu 9.04. I would like to treat the SHOUTcast server responses as HTTP response headers. For that I have used curl_slist_append() to set the string "ICY 200 OK" and set curl_easy_setopt() with CURLOPT_HTTP200ALIASES. I am dumping the header in a file
using CURLOPT_WRITEHEADER option. But I am still getting the SHOUTcast headers in the body. To make sure , I have also set CURLOPT_HEADER to 0.

Can some one please suggest me if I am missing something here?
Here is the code snippet:

....
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
slist2 = curl_slist_append(slist2, "ICY 200 OK");
curl_easy_setopt(curl, CURLOPT_HTTP200ALIASES, slist2);
 
curl_easy_setopt (curl, CURLOPT_URL, "http://scfire-mtc-aa06.stream.aol.com:80/stream/1018");

curl_easy_setopt(curl, CURLOPT_HEADER, 0);

//This is instructing CURL to write the HEADER in the Callback
curl_easy_setopt(curl, CURLOPT_WRITEHEADER, fp); //fp is the file pointer

curl_easy_perform(curl);
......
......

Regards,
Souvik

Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-03-08