Error: 500 java.nio.charset.MalformedInputException in SPS
search cancel

Error: 500 java.nio.charset.MalformedInputException in SPS


Article ID: 272613


Updated On:


SITEMINDER CA Single Sign On Agents (SiteMinder) CA Single Sign On Secure Proxy Server (SiteMinder)



Running CA Access Gateway (SPS), when the browser request a file to download that filename has accented character as "à", then the download fails and the browser receives the HTTP return code 500.

The CA Access Gateway (SPS) Agent traces show the following error:

[08/08/2023][18:36:05][18:36:05.714][2933][140603056994048][][Noodle::doGet][java.nio.charset.MalformedInputException: Input length = 1   at java.nio.charset.CoderResult.throwException(]




From the network traces, the CA Access Gateway (SPS) receives the character as Hex e0, which is "à" in UTF-8.

In the network traces, the character isn't URL encoded as it should be (1)(2) for the location header, it reaches the SPS as HEX e0:

[08/16/2023][12:13:45][12:13:45.177][2562047][139813868304128][][requestConnection(): ][Get connection: {}->, timeout = 360000]
[08/16/2023][12:13:45][12:13:45.177][2562047][139813868304128][][openConnection()][Connecting to]
[08/16/2023][12:13:45][12:13:45.261][2562047][139813868304128][][releaseConnection(): ][Released connection is not reusable.]
[08/16/2023][12:13:45][12:13:45.261][2562047][139813868304128][][execute][Input length = 1]
[08/16/2023][12:13:45][12:13:45.261][2562047][139813868304128][][execute][Retrying to send the request to backend web server.Retry count: 3]
[08/16/2023][12:13:45][12:13:45.261][2562047][139813868304128][][execute][Tried to send the request to backend web server three times.Throwing the exception to client. ]
[08/16/2023][12:13:45][12:13:45.263][2562047][139813868304128][][Noodle::doGet][java.nio.charset.MalformedInputException: Input length = 1    at java.base/java.nio.charset.CoderResult.throwException(]
[08/16/2023][12:13:45][12:13:45.266][2562047][139813868304128][][ErrorPageImpl::displayMessage][Custom Error Pages : Custom message is not an URL. If URL is specified then it might not be in proper format. Considering it as plain text message.]


76    6.289605    HTTP    3787    GET /myapp/index.php?action=downloadDoc=123 HTTP/1.1
78    6.375920    HTTP    703    HTTP/1.1 302 Found

location: /myapp/docs/myfile.php?mime_type=application/pdf&nome_file=Attivit�.pdf&path_file=%2Fmyapp%2Fmydocument%2Fdoc123\r\n

0210 e0 is "à" in UTF-8 (3). 




  • Check with the application team the reason why the Location header has a URL unencoded character like à in this use case;
  • Ask the application team to url encode the characters in the Location header value to fix this issue;

Additional Information





    Unsafe characters


    Hex code point e0