tomcat-dev mailing list archives

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

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

Supercomputing Center Brno             Martin Kuba
Institute of Computer Science    email:
Masaryk University   
Botanicka 68a, 60200 Brno, CZ     mobil: +420-603-533775

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message