-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alexander,
On 6/8/2009 4:39 AM, Alexander Müller wrote: > I noticed the Tomcat implementation of > HttpServletRequest.getHeaderNames() returns all header names in lower > case. Is there any possibility to get them with their original case? The HTTP spec (HTTP/1.1, section 4.2: http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html) states that HTTP header field names are case-insensitive. You should not be relying on a particular caseification (?) of header fields. Are you just interested in what the client sent? I think you'd have to modify the Connector in order to do that. In order for the headers to be case-insensitive, case must be normalized when assembling headers (the same header is allowed multiple times, and the servlet spec requires that all those field values be available in a single Enumeration when calling getHeaders). The implementers chose lower case as their normalization technique. In order to undo that, you'll have to modify the source of Tomcat. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkotOT0ACgkQ9CaO5/Lv0PBglACdEN+OPLMHnZxFOdcimd18ro2n OLwAn0TMHNUmNqxpGkmL12p1YLEl8AFt =BVx/ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org