Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
5.0.1
-
None
Description
I am currently migrating from hc 4.x to hc 5.0.1 and faced a Problem:
In hc 4.x I was able to set the credentials charset to use for digest auth by creating a "DigestSchemeFactory" using this constructor: DigestSchemeFactory(java.nio.charset.Charset) and adding the instance to a "AuthSchemeRegistry" which I set as default for the client instance to use.
This is no longer possible (the encoding for "DigestScheme" can not be changed anymore), but probably needed when e.g. a password contains characters outside of "ISO-8859-1" (the current internal default for DigestScheme).
A possible (unattractive) workaround would be copying a lot of code (implement a own "DigestSchemeFactory", overwrite "org.apache.hc.client5.http.impl.auth.DigestScheme.generateAuthResponse(HttpHost, HttpRequest, HttpContext)", copy/modify "org.apache.hc.client5.http.impl.auth.DigestScheme.createDigestResponse(HttpRequest)" and copy "org.apache.hc.client5.http.impl.auth.HttpEntityDigester").
Also: Is there a Place where I find information that helps me to understand the decisions made for hc 5?