ok2c commented on code in PR #510: URL: https://github.com/apache/httpcomponents-client/pull/510#discussion_r1420232191
########## httpclient5/src/test/java/org/apache/hc/client5/http/impl/auth/TestDigestScheme.java: ########## @@ -746,4 +746,25 @@ public void testSerialization() throws Exception { Assertions.assertEquals(digestScheme.getCnonce(), authScheme.getCnonce()); } + + @Test + public void testErrorOnBothUsernameAndUsernameStar() throws Exception { + final ClassicHttpRequest request = new BasicClassicHttpRequest("Post", "/"); + request.setEntity(new InputStreamEntity(new ByteArrayInputStream(new byte[] {'a'}), -1, ContentType.DEFAULT_TEXT)); + final HttpHost host = new HttpHost("somehost", 80); + final CredentialsProvider credentialsProvider = CredentialsProviderBuilder.create() + .add(new AuthScope(host, "realm1", null), "username", "password".toCharArray()) + .build(); + + final String challenge = StandardAuthScheme.DIGEST + " realm=\"realm1\", nonce=\"f2a3f18799759d4f1a1c068b92b573cb\", " + Review Comment: > @ok2c, I understand the practicality aspect now. Could you please advise on how best to handle this test to ensure it aligns more closely with common scenarios involving the username and username* parameters? Any suggestions or examples would be greatly appreciated. @arturobernalg This check makes sense on the server side, which we have no support for. It makes little sense on the client side. I would drop the change-set altogether. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org