Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 1f6f01bb5 -> a55f8753a


[CXF-6574] Including a query during the digest calculation, thanks to Roger 
Talkov


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a55f8753
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a55f8753
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a55f8753

Branch: refs/heads/3.0.x-fixes
Commit: a55f8753a1386b3e0973567d99934ce7d4fddff3
Parents: 1f6f01b
Author: Sergey Beryozkin <sberyoz...@gmail.com>
Authored: Thu Sep 3 15:18:02 2015 +0100
Committer: Sergey Beryozkin <sberyoz...@gmail.com>
Committed: Thu Sep 3 15:18:55 2015 +0100

----------------------------------------------------------------------
 .../org/apache/cxf/transport/http/auth/DigestAuthSupplier.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a55f8753/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
----------------------------------------------------------------------
diff --git 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
index dfc2aa4..f34cfc8 100644
--- 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
+++ 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
@@ -74,7 +74,11 @@ public class DigestAuthSupplier implements HttpAuthSupplier {
                 /* Preemptive authentication is only possible if we have a 
cached
                  * challenge
                  */
-                return di.generateAuth(currentURI.getPath(), 
+                String authURI = currentURI.getPath();
+                if (currentURI.getQuery() != null) {
+                    authURI += '?' + currentURI.getQuery();
+                }
+                return di.generateAuth(authURI, 
                                        authPolicy.getUserName(),
                                        authPolicy.getPassword());            
             } else {

Reply via email to