Author: rjung Date: Wed Nov 10 19:01:15 2010 New Revision: 1033643 URL: http://svn.apache.org/viewvc?rev=1033643&view=rev Log: BZ 48925: request.getLocalAddr() returns null when using the default Jk AJP/1.3 connector.
Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1033643&r1=1033642&r2=1033643&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Nov 10 19:01:15 2010 @@ -144,14 +144,6 @@ PATCHES PROPOSED TO BACKPORT: when I go from JRE selection page to the next page in TC7 installer. kkolinko: merging r1027504 does not perform cleanly -* Fix for BZ 48925: request.getLocalAddr() returns "null" - It only happens for the old ajp implementation, so no fix for TC 7 needed. - Copy local addr from local name just as we do in the ajp processor - implementation. - http://people.apache.org/~rjung/patches/bz48925-tc6-ajp-localaddr.patch - +1: rjung, kkolinko, markt - -1: - * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50228 Improve recycling of BodyContentImpl. Recycle it as early. Do not wait until it is actually reused. Modified: tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java?rev=1033643&r1=1033642&r2=1033643&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java Wed Nov 10 19:01:15 2010 @@ -377,6 +377,10 @@ public class MsgContext implements Actio ByteChunk bc = (ByteChunk)param; req.setContentLength(bc.getLength()); jkIS.setReplay(bc); + } else if (actionCode == ActionCode.ACTION_REQ_LOCAL_ADDR_ATTRIBUTE) { + // Copy from local name for now, which should simply be an address + Request req=(Request)param; + req.localAddr().setString(req.localName().toString()); } } Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1033643&r1=1033642&r2=1033643&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Nov 10 19:01:15 2010 @@ -179,6 +179,10 @@ message. (markt) </fix> <fix> + <bug>48925</bug>: <code>request.getLocalAddr()</code> returns + <code>null</code> when using the default Jk AJP/1.3 connector. (rjung) + </fix> + <fix> <bug>49497</bug>: Stop accepting new requests (inc keep-alive) once the BIO connector is paused and the current request has finished processing. (markt) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org