8010505: HTTP DIGEST implementation incorrectly quotes header values, fails auth
authorjzavgren
Wed, 17 Apr 2013 11:47:18 -0400
changeset 17162 6b3dc8e20c04
parent 17161 df1ec0e2f0e7
child 17163 6a5e9b4f27d2
8010505: HTTP DIGEST implementation incorrectly quotes header values, fails auth Summary: The extraneous quotes were removed. Reviewed-by: chegar
jdk/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java
--- a/jdk/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Fri Apr 19 15:41:11 2013 +0800
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Wed Apr 17 11:47:18 2013 -0400
@@ -364,17 +364,18 @@
                         + ncfield
                         + ", uri=\"" + uri
                         + "\", response=\"" + response
-                        + "\", algorithm=\"" + algorithm;
+                        + "\", algorithm=" + algorithm;
         if (opaque != null) {
-            value = value + "\", opaque=\"" + opaque;
+            value = value + ", opaque=\"" + opaque;
+            value = value + "\"";
         }
         if (cnonce != null) {
-            value = value + "\", cnonce=\"" + cnonce;
+            value = value + ", cnonce=\"" + cnonce;
+            value = value + "\"";
         }
         if (qop) {
-            value = value + "\", qop=\"auth";
+            value = value + ", qop=auth";
         }
-        value = value + "\"";
         return value;
     }