> Just to nitpick, there is no "proper capitalisation", since the RFC says > that headers are case-insensitive.
I know, I referred to "proper" as in what the target machine expects. > Apart from that, I would offer the following subjective advice, in the > form of suggestions : > - it sounds like you are trying to use Tomcat as some kind of > transparent proxy here Its not actually a transparent one, but just a normal reverse proxy. > , and maybe in this case Tomcat is not the right > tool for the job. Maybe you should use some kind of front-end to Tomcat, > which will catch these requests, and proxy them to the broken back-end, > instead of trying to do this with Tomcat, which does not really have the > built-in mechanisms for that kind of thing. > (I'm thinking of Apache httpd, with mod_proxy, mod_rewrite, > mod_setenvif, mod_perl, etc..) > - you may want to have a look at the urlrewrite filter at www.tuckey.org > (yes, I know I sound like a salesman for that thing, and I'm starting to > think I should ask for a commission). It can check incoming headers, > and I believe it can delete and/or rewrite some of them before even > forwarding them to your Tomcat application. Unfortunately it is not only about simple proxying through but the application has to do more, particularly header validation and modification. > - if you really persist in wanting to do this at the application level, > I would look at it in another way : rather than trying to be a > transparent proxy, have your Tomcat application : > a) receive and process the client request, including the lower-cased > headers > b) from your application, issue a brand /new/ HTTP request to the > broken back-end, composing the headers that you know it expects. For > that, you could use some library like the Apache Commons HTTPClient. Thats what I am already doing and where I encountered this bug/feature/whatever :). > The problem with trying to modify the Tomcat code for this, is that you > will set yourself up for all kinds of annoyances, because you cannot > even be sure how all /your/ different clients may capitalise these > headers or not when they send the request to you. So you could be faced > with having to check if you got a header like "User-Agent" or > "USER-AGENT" or "user-agent" and so on... The choice of modifying the actual source code would have been probably the last as this would come with too many implications (security fixes, upgrades, maintainability, ....). Thanks, Alexander --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org