Skip to content

Commit 4466cca

Browse files
committed
HTTPCLIENT-2393 - remove rspauth from Authorization (#716)
RFC 7616 compliance: rspauth is server-side (Authentication-Info §3.5) only. (cherry picked from commit 89da742)
1 parent da1a8e0 commit 4466cca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/DigestScheme.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,6 @@ private String createDigestResponse(final HttpRequest request) throws Authentica
471471
params.add(new BasicNameValuePair("qop", qop == QualityOfProtection.AUTH_INT ? "auth-int" : "auth"));
472472
params.add(new BasicNameValuePair("nc", nc));
473473
params.add(new BasicNameValuePair("cnonce", cnonce));
474-
params.add(new BasicNameValuePair("rspauth", hasha2));
475474
}
476475
if (algorithm != null) {
477476
params.add(new BasicNameValuePair("algorithm", algorithm));

httpclient5/src/test/java/org/apache/hc/client5/http/impl/auth/TestDigestScheme.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ void testDigestAuthenticationWithNonAsciiUsername() throws Exception {
903903
}
904904

905905
@Test
906-
void testRspAuthFieldAndQuoting() throws Exception {
906+
void testRspAuthFieldNotPresentClient() throws Exception {
907907
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/");
908908
final HttpHost host = new HttpHost("somehost", 80);
909909
final CredentialsProvider credentialsProvider = CredentialsProviderBuilder.create()
@@ -921,7 +921,8 @@ void testRspAuthFieldAndQuoting() throws Exception {
921921

922922
final Map<String, String> table = parseAuthResponse(authResponse);
923923

924-
Assertions.assertNotNull(table.get("rspauth"));
924+
Assertions.assertNotNull(table);
925+
Assertions.assertNull(table.get("rspauth"));
925926
}
926927

927928
@Test

0 commit comments

Comments
 (0)