cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Repeated HTTP Authorization after 401 response with uknown method

From: Joe Mason <jmason_at_rim.com>
Date: Mon, 27 Aug 2012 20:22:57 +0000

> From: curl-library [curl-library-bounces_at_cool.haxx.se] on behalf of Petr Pisar
> [petr.pisar_at_atlas.cz]
>
> I think special option mandating sending the Authorization header not matter
> what would the best one.

Well, IMHO this definitely shouldn't work without a curl_easy_reset: once the server has sent a 401 without Basic, curl knows the server doesn't accept Basic auth and shouldn't send it. (It's ok for curl to send Basic auth with its first request, before its received a 401, since that will save a roundtrip if the server happens to accept it.)

In theory doing a curl_easy_reset should cause curl to forget all details of the previous responses, so it should go back to sending your Basic auth. But there was a recent bug with this, which should be fixed now.

Aha. The fix was made just AFTER the 7.27.0 release. Try downloading the most recent code from git and compiling that to see if it fixes your problem.

Joe
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-08-27