5 Replies Latest reply on Mar 5, 2013 5:07 AM by Markus Plangg

    Encoding of POST requests

    Markus Plangg Newbie

      I have a problem with the encoding of POST requests when using picketlink on JBoss AS 7.1.x. A similar issue was already asked at https://community.jboss.org/thread/174580 but there is no real solution.


      The content-type of post requests is set to application/x-www-form-urlencoded. When the parameters of the request are accessed for the first time, JBoss parses them and unfortunately defaults to ISO-8859-1. So any special characters are parsed with the wrong encoding. For any later accesses to the parameters, the already parsed values are returned.


      JBoss' solution for this is to create a filter that sets the request encoding to UTF-8. However since picketlink implements a Valve and accesses the parameters (e.g. in AbstractSPFormAuthenticator.java) it always accesses the parameters before the filter can set the encoding.


      Is there any solution to this? Could the encoding be a configuration option for picketlink?