tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54984] New: multipart/form-data is not always read with correct encoding
Date Thu, 16 May 2013 11:15:20 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54984

            Bug ID: 54984
           Summary: multipart/form-data is not always read with correct
                    encoding
           Product: Tomcat 7
           Version: 7.0.40
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: holmis83@gmail.com
    Classification: Unclassified

The bug occurs when form data is posted as multipart/form-data and using
Servlet 3 API to get posted files.
In a servlet, if we set the encoding:

request.setCharacterEncoding("UTF-8");

Then invoke:

request.getParts()

And then invoke:

String text = request.getParameter("sometextfield");

UTF-8 characters in the text have been garbled.

Order of method calls are significant, if a getParameter is called before
getParts, the correct encoding will be used.
However, the order which you invoke the methods should not matter.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message