hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Crosbie <kcros...@ravenpack.com>
Subject Re: Repeated Proxy-Authorization Challenges
Date Mon, 12 Nov 2007 16:35:49 GMT
Kevin Crosbie wrote:
> I guess I can store the Proxy-Authorization header as a string and set
> the header value every time I make a request.

Looks like it's not so easy to just save the Proxy-Authorization header.
If I say:
if (this.authHeader != null)
int status = client.executeMethod(method);
this.authHeader = method.getRequestHeader("Proxy-Authorization");

where this.authHeader is of type org.apache.commons.httpclient.Header
and the <snip></snip> are pieces taken from my code where more code runs
between snips, such as setDoAuthentication etc.

This works fine, if the challenge is always correct but if, say, the
nonce had changed between posts, then the challenge is not processed a
second time (i.e. the header that I added is taken to be the response to
the challenge generated in this iteration).

I guess the only way to fix this is to change the authorizers so that
they can cache intermediate requests and try to authenticate at least
one more time in the case of Digest authentication if a challenge is
received after a post.

Anyway, just thought I'd update.

Best Regards,

Kevin Crosbie

To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

View raw message