cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_getinfo() for CURLINFO_RESPONSE_CODE does not work for ICY URLs

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 26 Mar 2009 16:24:31 +0100 (CET)

On Thu, 26 Mar 2009, centrio_at_gmail.com wrote:

> curl_slist aliases = 0;

That seems unlikely to be fine to the compiler.

> aliases = curl_slist_append(aliases, "ICY 401 Service Unavailable");
> curl_easy_setopt(curlHandle, CURLOPT_HTTP200ALIASES, aliases);

Are you seriously saying that "401 Service Unavailable" should be equal to 200
OK? It sounds a bit strange in my ears...

> 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.??

Because there's no support for that kind of stunt and I don't even understand
why you thought so in the first place. The "ICY" thing is an abomination as it
is already, let's not continue that silliness any further.

-- 
  / daniel.haxx.se
Received on 2009-03-26