Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-2106

Credentials charset for DigestScheme can not be configured any more

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.0.1
    • 5.1-beta1
    • HttpClient (classic)
    • 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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            synth3 synth3
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: