cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: re-using connection with authentication

From: Sigrid Thijs <sigrid.thijs_at_androme.com>
Date: Mon, 26 Mar 2007 16:29:34 +0200

Daniel Stenberg wrote:
> On Mon, 26 Mar 2007, Sigrid Thijs wrote:
>
>> But I still get the same result: the second request is sent without
>> body and a 400 response is returned.
>
> I've figured out the problem:
>
> 1. Use a multi handle
>
> 2. First use easy handle A to POST to a URL with Digest authentication.
>
> 3. Then use easy handle B to post to the same URL with the same
> authentication and do another POST.
>
> Now, the confusion you see arises here because the auth state info from
> the operation on easy handle A is partly kept in the easy handle, and
> you don't re-use that handle you just re-use the same connection for
> step 3 above.
>
> So, when you use handle B it doesn't have the complete authentication
> state awareness and thus "restarts" the negotiation for auth.
>
> As I see it, we need to move the authentication state (struct auth) from
> the "struct UrlState" in the SessionHandle struct to the connectdata
> struct.
>
> Any chance you feel like taking a stab at that?
>

I'm not sure if I know enough about libcurl to do this. If it's only
moving the authentication state and adjusting the code that uses these
struct's, it would be doable. But I don't know what the impact is of
this change? I don't really have the time to go real deep into libcurl.

kind regards,

Sigrid
Received on 2007-03-26

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET