Author: oglueck
Date: Wed Sep 14 11:59:25 2005
New Revision: 280908
URL: http://svn.apache.org/viewcvs?rev=280908&view=rev
Log:
PR #36372 (nonce-count in digest auth should not be quoted)
Contributed by Ortwin Glück
Reviewed by Oleg Kalnichevsky
Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/DigestScheme.java
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java
Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/release_notes.txt?rev=280908&r1=280907&r2=280908&view=diff
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Wed Sep 14
11:59:25 2005
@@ -1,6 +1,9 @@
Changes since Release Candidate 3:
+ * 36372 - nonce-count in digest auth should not be quoted
+ Contributed by Ortwin Glueck <oglueck at apache.org>
+
* 36369 - Custom Proxy-Connection header no longer gets overwritten
Contributed by Oleg Kalnichevski <olegk at apache.org>
@@ -21,7 +24,7 @@
* 35642 - Do not retry if host is unreachable. This ensures a connection
timeout
will be obeyed.
- Contributed by Ortwin Gl�ck <oglueck at apache.org>
+ Contributed by Ortwin Glueck <oglueck at apache.org>
* 35815 - SimpleHttpConnectionManager now logs warnings when it detects it is
being used incorrectly.
Modified:
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/DigestScheme.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/DigestScheme.java?rev=280908&r1=280907&r2=280908&view=diff
==============================================================================
---
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/DigestScheme.java
(original)
+++
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/DigestScheme.java
Wed Sep 14 11:59:25 2005
@@ -111,7 +111,6 @@
super();
this.complete = false;
this.formatter = new ParameterFormatter();
- this.formatter.setAlwaysUseQuotes(true);
}
/**
@@ -491,6 +490,9 @@
if (i > 0) {
buffer.append(", ");
}
+ boolean noQuotes = "nc".equals(param.getName()) ||
+ "qop".equals(param.getName());
+ this.formatter.setAlwaysUseQuotes(!noQuotes);
this.formatter.format(buffer, param);
}
return buffer.toString();
Modified:
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java?rev=280908&r1=280907&r2=280908&view=diff
==============================================================================
---
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java
(original)
+++
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java
Wed Sep 14 11:59:25 2005
@@ -179,7 +179,7 @@
AuthScheme authscheme = new DigestScheme();
authscheme.processChallenge(challenge);
String response = authscheme.authenticate(cred, method);
-
+ assertTrue(response.indexOf("nc=00000001") > 0);
Map table = AuthChallengeParser.extractParams(response);
assertEquals(username, table.get("username"));
assertEquals(realm, table.get("realm"));
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]