cURL / Mailing Lists / curl-library / Single Mail

curl-library

CURLOPT_HTTP200ALIASES & shoutcast "headers"

From: sundararaj reel <sundararaj.reel_at_googlemail.com>
Date: Fri, 27 Jun 2008 17:11:43 +0200

Hi all,

 I am trying to extract shoutcast headers from shoutcast server response.
The curl installed in my machine does not seem to consider ICY 200 OK to be
a header string. So, I am not able to use --dump-header option.

So, with libcurl I am trying to set CURLOPT_HTTP200ALIASES as "ICY 200 OK"
and still no change. I see that a lot of code on the net use this option but
in my program it does not work.

Please correct me if I wrong here is what I did:

   /* add header strings **/
  struct curl_slist *slist=NULL;
  slist = curl_slist_append(slist, "ICY 200 OK");

  curl_easy_setopt( curl_handle, CURLOPT_HTTP200ALIASES, slist);

Here is the complete code that is supposed to write out only the header:
http://pastebin.com/f2fbe81f5

I suppose I could expect an output similar to this " curl -s
http://85.17.176.134:8020 | head "

Many thanks in advance.

-- 
Sundararaj
Received on 2008-06-27