cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: any specific error for "proxy authentication failed"?

From: Armel Asselin <asselin.armel_at_wanadoo.fr>
Date: Fri, 15 Sep 2006 10:54:20 +0200

>> I could not find a specific error when the proxy authentication failed
>> (I'm doing FTP tunneling over an HTTP proxy). I just get
>> CURLE_RECV_ERROR. Without such a code, i cannot popup a 'Proxy login' box
>> or simply tell why it failed. would it be a good idea to submit a patch
>> for that?
>
> There's no specific error when normal HTTP authentication fails either,
> since the error codes are (with some rare exceptions) saved for transfer
> errors and as long as the transfer went fine it isn't considered a libcurl
> error but a higher level error that should be extracted with
> curl_easy_getinfo() or similar.
>
> In this case, I figure you getting a 407 back would be indication enough,
> won't it?
hum yes having a 407 error code would be perfect (the CURLINFO_RESPONSE_CODE
is currently not set at all), but I would need to know that this code comes
from the proxy (407 may mean something for FTP, and for HTTP it is important
to know which of server or proxy is not happy).

Armel
Received on 2006-09-15