Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8224566

HTTP basic authentication failing due to ISO-8859-1 encoding

XMLWordPrintable

      ADDITIONAL SYSTEM INFORMATION :
      MacOS 10.14.4
      Java 1.8.0_201

      A DESCRIPTION OF THE PROBLEM :
      We have implemented an java.net.Authenticator and overriden the getPasswordAuthentication method to return a PasswordAuthentication instance. When the username in this class contains French accented characters we are failing to log in to the web server when using HTTP basic authentication.

      This seems to be due to the default encoding of username and password being ISO-8859-1 (i.e. take a look at SocksSocketImpl.authenticate)

      Most browsers use UTF-8 encoding when sending username and password in the HTTP Authorization header.

      Is there any way to make this configurable?


            dfuchs Daniel Fuchs
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: