cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: quick question about share interface

From: Mehmet Fidanboylu <mehmetf_at_gmail.com>
Date: Mon, 26 Sep 2005 18:10:44 -0700

Daniel,

Thank you for the response.. See my inline comments below..

On 9/26/05, Daniel Stenberg <daniel-curl_at_haxx.se> wrote:
> On Fri, 23 Sep 2005, Mehmet Fidanboylu wrote:
>
> > 1. I will be using multiple CURL handles simultaneously and I need a central
> > context from which to serve data to these handles.
>
> As long as you use separate CURL handles in different threads, you have no
> worries at all.
>
Great!

> > I would also like to be able to share the authentication parameters across
> > handles.
>
> What kind of authentication parameters are you referring to here?

Realm, username, pwd.

>
> > I believe the Curl_share struct is analogous to a context, so is extending
> > the share interface (and this construct), plus enhancing the code in
> > transfer.c the right way to go here?
>
> If you really need it in the share context then it sounds like a good way to
> proceed.
>
Thanks!

> > 2. I realized that for the authentication schemes (out of which I will only
> > use BASIC), realm is not a configurable.
>
> Realm is something you get from the server. You mean you want to set a
> user+password for a given realm?
>

Yes.

> If so, no it isn't supported.
>

Thanks for the concise answer, I believe I can resolve this by setting
and resetting the credentials on the single handle..

> I could possibly be
> persuaded into supporting multiple name/password pairs based on realm or
> similar, but first I would like a good answer to why it would be necessary!

One thing I can think of is page forwards.. "When using HTTP and
CURLOPT_FOLLOWLOCATION, libcurl might perform several requests to
possibly different hosts. libcurl will only send this user and
password information to hosts using the initial host name (unless
CURLOPT_UNRESTRICTED_AUTH is set), so if libcurl follows locations to
other hosts it will not send the user and password to those." This
might be a limitation for some of the users of the library.
Received on 2005-09-27