-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Broken support for Digest authentication with query parameters #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Tag in for 1.7.2, start looking at it. |
I did a quick check and it appears that the parameter duplication doesn't occur with the Grizzly-based provider. Could you confirm? |
Nice find @rlubke It was hard to see what the future uris were without extra debug logging. Since the futures already store a ref to the request, why do they need a store the uri separately instead of delegating that call to the request itself https://github.com/sonatype/async-http-client/blob/master/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java#L101-102 |
…is already configured using the existing request. If this block executes, it pushes the same url that the request already has. Removing the block resolves issue #62. Existing tests continue to pass. Reviewed by JFA.
@softprops I can't comment on why. I mostly deal with the Grizzly side of things. Coming up to speed on the Netty side. |
New snapshot build (1.8.0-SNAPSHOT) should be available soon with the fix. Please confirm resolution when/if time permits. |
On Thu, Mar 8, 2012 at 2:03 PM, Ryan Lubke <
http://repo1.maven.org/maven2/com/ning/async-http-client/
|
On Thu, Mar 8, 2012 at 9:28 PM, Doug Tangren [email protected] wrote:
https://oss.sonatype.org/content/repositories/snapshots/com/ning/async-http-client/ |
On Thu, Mar 8, 2012 at 9:31 PM, Doug Tangren [email protected] wrote:
And it works! Mar 8, 2012 9:40:17 PM using Channel Mar 8, 2012 9:40:17 PM Request DefaultHttpRequest(chunked: false) Response DefaultHttpResponse(chunked: true) Mar 8, 2012 9:40:17 PM using Channel Mar 8, 2012 9:40:17 PM Request DefaultHttpRequest(chunked: false) Response DefaultHttpResponse(chunked: true) Mar 8, 2012 9:40:17 PM Thanks Ryan! |
Good to hear! Will close this out. |
Co-Authored-By: Joe Smith <[email protected]>
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 But soon afterwards saw a request where the authentication request header contained the original uri but the actual request's 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.
The text was updated successfully, but these errors were encountered: