Bug 1439225
| Summary: | [GSS](6.4.z) multipart/form-data is not always read with correct encoding | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Aaron Ogburn <aogburn> | ||||||||
| Component: | Web | Assignee: | Jiri Ondrusek <jondruse> | ||||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Radim Hatlapatka <rhatlapa> | ||||||||
| Severity: | unspecified | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | 6.4.14 | CC: | bmaxwell, jondruse, mcada, rmaucher, rstancel | ||||||||
| Target Milestone: | CR1 | ||||||||||
| Target Release: | EAP 6.4.16 | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | component:jbossweb | ||||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2017-06-22 09:20:06 UTC | Type: | Bug | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | |||||||||||
| Bug Blocks: | 1434495, 1440846 | ||||||||||
| Attachments: |
|
||||||||||
Created attachment 1268961 [details] bz1439225.diff Here's some changes that addressed the issue on my end Created attachment 1268988 [details]
multipartdemo-0.0.1.war
Created attachment 1268989 [details]
multipartdemo_source.zip
Verified with EAP 6.4.16.CP.CR1 Released on June 20 2017 as part of the EAP 6.4.16 maintenance release. |
Description of problem: 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. Version-Release number of selected component (if applicable): 7.5.22 How reproducible: Always Steps to Reproduce: 1. Deploy multipartdemo-0.0.1.war 2. Access /multipartdemo-0.0.1 3. Submit form with UTF-8 characters Actual results: Expected encoding is not properly used for multipart/form-data, resulting in bad characters. Expected results: Expected encoding is properly used for multipart/form-data. Additional info: Similar to this tomcat issue https://bz.apache.org/bugzilla/show_bug.cgi?id=54984