tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 15759] New: - CGI Servlet does not preserve the POST data encoding
Date Thu, 02 Jan 2003 11:25:14 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15759>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15759

CGI Servlet does not preserve the POST data encoding

           Summary: CGI Servlet does not preserve the POST data encoding
           Product: Tomcat 4
           Version: 4.1.18
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Servlets:CGI
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: s2247990@cse.unsw.edu.au


When I submit "http://...../test.cgi?name=XXX" where XXX is encoded using
Shift_JIS(Japanese), CGI Servlet re-encodes XXX using ISO-8859-01. As a result,
the cgi script does not function properly.

For example, while XXX should be "%82%B1%82%F1%82%C9%82%BF%82%CD" ("hello" in
Japanese using Shift_JIS encoding), CGI Servlet gives "%3F%3F%3F%3F%3F" instead.

I had a quick look at org.apache.catalina.servlets.CGIServlet.java and I think
the problem comes from the constructor of CGIEnvironment. It uses
java.net.URLEncoder#Encode(String) which will encode the string inappropriately.
(Although I have not tested yet.)

Thanks.

Tomcat: 4.1.18-LE-jdk14 (Standalone)
SDK: 1.4.1_01-b01
Platform: Windows XP(English version) + Multi Language Pack

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


Mime
View raw message