sonatype/async-http-client — Issue #62: Broken support for Digest authentication with query parameters
Author: softprops
Created: 2012-03-07 04:01:55+00:00
State: open

This is a follow up to a message I posted on the mailing list, https://groups.google.com/d/topic/asynchttpclient/kNCB8Mu7CHM/discussion. I am seeing an issue where the dialog between client and server for handling 401 digest authentication requests fail for all uris containing query parameters because, at some point in the dialog, the request parameters are duplicated invalidation the digest challenge. See my post for the debug logging output of the handshake.

I tried to trace the code through the netty provider. It looks like the request url was intact [here](https://github.com/sonatype/async-http-client/blob/master/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java#L2036) But soon afterwards saw a request where the authentication request header contained the original uri but the actual requests query parameters were duplicated invalidating the auth header.

Note this is only an issue with uris containing query parameters. A uri without query parameters seemed to handle digest authentication fine.