cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_easy_getinfo() for CURLINFO_RESPONSE_CODE does not work for ICY URLs

From: <centrio_at_gmail.com>
Date: Thu, 26 Mar 2009 13:52:33 +0000

Hi

I am using using
curl_slist aliases = 0;
aliases = curl_slist_append(aliases, "ICY 401 Service Unavailable");
curl_easy_setopt(curlHandle, CURLOPT_HTTP200ALIASES, aliases);

I am using libcurl api to get the response code for a URL. I am using
curl_easy_getinfo() for CURLINFO_RESPONSE_CODE .

However when I get a URL whose response code is ICY 401, libcurl does not
return this code through the API. If I use curl_easy_getinfo(), it returns
me 0 for URLs which return ICY 400 or any other code which is not 200.

Can you tell me why getinfo() does not return the actual response code for
the ICY URLs.??

I tried URLs with HTTP 400 code. The API gives response code of 400 in this
case.

Thanks and Regards
Shivanand
Received on 2009-03-26