You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Chris Brown <br...@reflexe.fr> on 2003/03/21 15:58:43 UTC

Using appropriate credentials and state with multiple hosts

Hi,

I'm using HttpClient 2.0 alpha 3, and am trying to find out how to work with
multiple hosts, sometimes with authentification, sometimes without,
sometimes with NTLM.  Some questions, hope should be easy to answer...

1.) Is there already some method to parse authentification headers to
extract the realm, or do I have to parse this myself (I've looked around a
bit, may have missed it) ?

2.) Do I need a separate HttpState per client per host?  From the javadocs,
it seems that if more than one host uses the same realm name, such as
"Private" (by coincidence), then I'm stuck, as HttpState can only store one
set of credentials for a given name...

Thanks,
Chris