You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2016/06/28 08:32:55 UTC

[Bug 59764] Character encoding is wrong for requests which mix GET and POST parameters

https://bz.apache.org/bugzilla/show_bug.cgi?id=59764

zhenek <vr...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vrablik@gmail.com
                 OS|                            |All

--- Comment #1 from zhenek <vr...@gmail.com> ---
Hi,

I have tested with tomcat 8.0.30 the attached war using these curl requests

curl -i -X POST -d postParam=All+the+way+to+San+Jos%C3%A9! 
http://localhost:8080/EncodingBug/EchoParamsServlet?getParam=All%20the%20way%20to%20San%20Jos%C3%A9

the response is not correct

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=UTF-8
Content-Length: 74
Date: Tue, 28 Jun 2016 08:09:36 GMT

getParam: All the way to San José
postParam: All the way to San José!


Same request but with charset specified returns null instead of the invalid
string

curl -i -X POST -H "Content-Type: text/html; charset=UTF-8" -d
postParam=All+the+way+to+San+Jos%C3%A9! 
http://localhost:8080/EncodingBug/EchoParamsServlet?getParam=All%20the%20way%20to%20San%20Jos%C3%A9

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=UTF-8
Content-Length: 51
Date: Tue, 28 Jun 2016 08:16:17 GMT

getParam: All the way to San José
postParam: null

-- 
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