Summary: | ((ServletRequest) request).getLocalAddr() returns "null" | ||
---|---|---|---|
Product: | Tomcat 6 | Reporter: | Paul Alesius <Paul> |
Component: | Connectors | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | adalfa, Paul |
Priority: | P2 | ||
Version: | 6.0.29 | ||
Target Milestone: | default | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | simple servlet to test getLocalAddr() |
Description
Paul Alesius
2010-03-16 23:13:01 UTC
Paul, can you reproduce this with a test case? If so please attach and I will be happy to take a look at it for you. RGS SY Created attachment 26262 [details]
simple servlet to test getLocalAddr()
Hi Steven, I've encountered the same problem on iis 7.0 with isapi_Redirect 1.2.31 and i was able to reproduce the issue with mod_jk 1.2.30 with apache 2.2 both in tomcata 5.5 and 6.0. I'm not familiar with the test case used with mod_jk so i write a simple servlet that echoes the getLocalAddr value. Is that enough or you need more? thanks andrea I've tested mod_jk 1.2.30 with Jetty 7.2 and tomcat 7.0.4 and the problem does not occur anymore. in tomcat-6.0.29 i still have the issue I proposed a fix for Tomcat 6. It is available at http://people.apache.org/~rjung/patches/bz48925-tc6-ajp-localaddr.patch It only happens for the default implementation of the AJP connector. If you switch to protocol="org.apache.coyote.ajp.AjpProtocol" in the connector configuration, it should be fine. That's the implementation used by Tomcat 7. Note also, that our implementation of localAddr() will simply return the same as localName(), so you can also switch to that method. Regards, Rainer |