tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 58464] servletRequest.getHeaderNames() returns all header names in lower case
Date Thu, 01 Oct 2015 14:44:40 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=58464

--- Comment #4 from Christopher Schultz <chris@christopherschultz.net> ---
I'm not sure how many people care about this kind of thing, but I have to
interact with a web service that uses JSON to pass data back and forth. The
service has a way of being oddly case-insensitive in certain cases, so we have
to treat all key/value pairs as if the key were case-insensitive, but I do in
fact like to see what the server is actually sending.

So I've implemented a simple Map that will store the original case of the key
and use that for things like Map.keySet, but also stores a case-insensitive map
of the names for quick comparison/lookup.

I'm not sure what the performance implication of those additional lookups might
be, or the extra garbage that would be generated for each request, but it's
certainly possible to maintain the original case of the request headers and
also treat them case-insensitively.

If anyone is super interested in this kind of thing, it seems like it would be
easy to add a configuration option that would simply substitute a
case-insensitive Map (like that which I described above) for the current
lowercase-only Map.

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


Mime
View raw message