cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Repeated HTTP Authorization after 401 response with uknown method

From: Petr Pisar <petr.pisar_at_atlas.cz>
Date: Tue, 28 Aug 2012 10:48:04 +0200

On Tue, Aug 28, 2012 at 06:02:59PM +0000, Joe Mason wrote:
> > From: curl-library [curl-library-bounces_at_cool.haxx.se] on behalf of Petr Pisar
> > [petr.pisar_at_atlas.cz]
> >
> > In addition I tried to figure out what everything has to be re-set to get
> > Authorization header in second request and it looks like nothing special is
> > needed. No curl_easy_reset(), no setting no CURLOPT_PASSWORD even no
> > CURLOPT_HTTPAUTH.
> >
> > So I'm more than satisfied with current master head. I'm just not sure it
> > matches your idea exactly. (Maybe I should note the server I use closes
> > connection after each request.)
>
> I believe my idea that you need curl_easy_reset only applies if the same
> connection is reused.
>
What do you mean by connection? TCP connection? CURL handle?

I feel the library should provide the same semantics regardless HTTP layer
needs to reconnect TCP socket or not.

> When you say "no CURLOPT_HTTPAUTH", do you mean that after sending the first
> request, you call "curl_easy_setopt(CURLOPT_HTTPAUTH, NULL)" or something
> like that to clear the HTTPAUTH? Or just that you don't update the
> CURLOPT_HTTPAUTH between requests?
>
The later one---that I do not set the option again. Plain curl_easy_perform()
followed by another perform().

-- Petr

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

  • application/pgp-signature attachment: stored
Received on 2012-08-28