tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kuba <ma...@ics.muni.cz>
Subject ServletRequest.setCharacterEncoding() and GET parameters
Date Thu, 08 Jan 2004 14:23:34 GMT
Hi,

I have found recently that current TomCat 5 uses different
encoding for POST and GET parameters. I was quite surprised,
because all bugs opened for this issue are just closed as invalid
without an explanation.
But after a long searching I found the discussion about bug 23929 at 
http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg50866.html
and I understand now that in the next realease, there will be
a configuration option useBodyEncodingForURI="true" of a connector.

I just want to say that I think that it should be the default
setting, not something that must be found after searching web and mail
archives for several hours and manually injected into server.xml

I agree with Jess Hole that it is a de facto standard and
the SUN servlet specification seems to indicate that
setCharacterEncoding() should affect all parameters.
Remember that GET and POST parameters are merged together.

Using different encoding for GET and POST parameters by default
is counter-intuitive and breaks the Principle of least astonishment.
If it is kept that way, the same bug will be reported again and again.

Martin
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Supercomputing Center Brno             Martin Kuba
Institute of Computer Science    email: makub@ics.muni.cz
Masaryk University             http://www.ics.muni.cz/~makub/
Botanicka 68a, 60200 Brno, CZ     mobil: +420-603-533775
--------------------------------------------------------------


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


Mime
View raw message