curl-library
RE: HTTP Pipelining & Digest Authentication
Date: Wed, 18 Jul 2012 22:58:46 +0000
> From: curl-library-bounces_at_cool.haxx.se [curl-library-bounces_at_cool.haxx.se] on
> behalf of Glen Miner [shaggie76_at_hotmail.com]
> Sent: Wednesday, July 18, 2012 4:30 PM
> To: curl-library_at_cool.haxx.se
> Subject: HTTP Pipelining & Digest Authentication
>
> Setting CURLMOPT_PIPELINING on my CURLM handle causes problems for me when I
> use digest authentication (7.26.0, C++, Win64).
>
> I get a CURLMSG_DONE message which reports CURLE_OK but curl_easy_getinfo
> CURLINFO_RESPONSE_CODE gives me 0 and the downloaded buffer has the
> boilerplate 401 anauthroized HTTP in it over and over as if all the pipelined
> requests failed and put their results in the same message.
I bet this is due to https://sourceforge.net/tracker/?func=detail&aid=3545398&group_id=976&atid=100976, which I just found today.
The description is incomplete. There's ALL SORTS of auth-related state that isn't cleared between requests. (I'm going to gather more data and update the bug with test cases tomorrow.) It wouldn't surprise me at all if pipelining causes more data to leak.
> I was wondering if I could defer setting CURLMOPT_PIPELINING until the 1st
> request through the CURLM handle was complete but I can't be sure when I was
> reconnected to disable until a request had gone through.
You could use CURLOPT_FRESH_CONNECT on each curl handle that uses digest auth. That would cause each request that uses digest to use its own connection, while other requests still use pipelining. (Unfortunately it didn't fix my problem with the bug I linked to above, so I can't guarantee it, but it's worth a try.)
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-07-19