You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave Dribin <da...@dribin.org> on 2004/09/23 22:18:08 UTC
getParameter() should be case insensitive?
Hi all,
I need to settle a debate here in the office...
HttpServlet.getParamter() is case sensitive, i.e., these are not the
same:
request.getParameter("name");
request.getParameter("Name");
This is, however, contrary to other APIs and even the HTML spec (I
believe). For example, Apache::Request treats parameter names as case
insensitive:
http://search.cpan.org/~joesuf/libapreq-1.3/Request/Request.pm
and I've been told that both ASP and ASP.NET are case insensitive
(don't have access, so can't test myself).
The HTML 4.01 specification specifically states that form input names
are case insensitive:
http://www.w3.org/TR/html401/interact/forms.html#h-17.4
Now, the HTML spec doesn't specify how the browser should create the
GET URL, only that the user agent treat them as case insensitive.
So, does anyone have a normative reference to support the Tomcat and
servlet API stating that the current, case sensitive getParameter()
behavior is correct? I've muddled through RFCs and can't seem to find
anything to support that.
Thanks!
-Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org