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: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 26 Mar 2007 15:29:52 +0200 (CEST)

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?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
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