cURL / Mailing Lists / curl-library / Single Mail

curl-library

Obtaining realm

From: Maxi Combina <maxicombina_at_gmail.com>
Date: Wed, 5 Nov 2008 13:51:42 +0100

Hello,

I am using libcurl 7.19.0. I am behind a proxy with Basic
authentication, and need to obtain the realm that the proxy sends me
with a 407 message.
If I set CURLOPT_HEADER to 1 and set CURLOPT_WRITEFUNCTION I can see
that the proxy sends basically this:

HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Basic realm="my.domain"

I could parse that and I'm done.

On the other hand, I suppose that there is some way to obtain the
realm using curl_easy_getinfo(). However, I could not find any
relevant info in the man page or in the web. I did find some one that
asked the same question in 2005 [1] and the answer was "not
implemented yet" [2].

Has this feature already been implemented? If not, I _might_ have some
time to implement it, but would greatly appreciate help for diving
into libcurl code.

Kind regards,
Maxi

[1] http://curl.haxx.se/mail/lib-2005-01/0262.html
[2] http://curl.haxx.se/mail/lib-2005-01/0265.html
Received on 2008-11-05