cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Strange header from https connection

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 3 Aug 2006 23:55:05 +0200 (CEST)

On Thu, 3 Aug 2006, Tomaz Noleto wrote:

> I implemented a simple function to retrieve header from a https url, but
> header has been coming with 2 different status code responses (from
> different http versions) and this Proxy-Agent field duplicated,

...

> Is it normal behaviour

No

> or could it be some kind of server/libcurl peculiarity

Yes, but I would guess on a server weirdness then.

> (or even error of my app)?

Possibly that's even more likely.

> My application needs to know the actual status code response so I can handle
> it the correct way (e.g., if I get 401 response, I will call the function
> again and set CURLOPT_USERPWD option to authenticate, and stuff like that)
> and this kind of breaks the pattern I I had implemented to retrieve it.

You mean curl_easy_getinfo(... CURLINFO_RESPONSE_CODE ...) isn't good enough
for you?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-08-03