Repository: cxf Updated Branches: refs/heads/2.7.x-fixes 2fd4b117a -> 1c1146b2d
[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/1c1146b2 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1c1146b2 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1c1146b2 Branch: refs/heads/2.7.x-fixes Commit: 1c1146b2d736d9ff334e04a4c268a64d929495b4 Parents: 2fd4b11 Author: Sergey Beryozkin <[email protected]> Authored: Thu Sep 3 15:18:02 2015 +0100 Committer: Sergey Beryozkin <[email protected]> Committed: Thu Sep 3 15:22:10 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/1c1146b2/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 {
