Author: markt
Date: Thu Jan 20 17:14:00 2011
New Revision: 1061400

URL: http://svn.apache.org/viewvc?rev=1061400&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47319
Return IP address rather than null for getRemoteHost() and the APR connector

Modified:
    tomcat/tc5.5.x/trunk/STATUS.txt
    
tomcat/tc5.5.x/trunk/connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java
    tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1061400&r1=1061399&r2=1061400&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Thu Jan 20 17:14:00 2011
@@ -98,13 +98,6 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko, markt
   -1:
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47319
-  Return IP address rather than null for getRemoteHost() and the APR connector
-  http://svn.apache.org/viewvc?view=revision&revision=1056414
-  (markt's patch)
-  +1: kkolinko, rjung, markt
-  -1:
-
 * Additional patch for bug 50413:
   Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50413#c6
   Serve the error page regardless of "Range" header in the original request.

Modified: 
tomcat/tc5.5.x/trunk/connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=1061400&r1=1061399&r2=1061400&view=diff
==============================================================================
--- 
tomcat/tc5.5.x/trunk/connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java
 (original)
+++ 
tomcat/tc5.5.x/trunk/connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java
 Thu Jan 20 17:14:00 2011
@@ -1046,6 +1046,9 @@ public class Http11AprProcessor implemen
                 try {
                     long sa = Address.get(Socket.APR_REMOTE, socket);
                     remoteHost = Address.getnameinfo(sa, 0);
+                    if (remoteHost == null) {
+                        remoteHost = Address.getip(sa);
+                    }
                 } catch (Exception e) {
                     log.warn(sm.getString("http11processor.socket.info"), e);
                 }

Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml?rev=1061400&r1=1061399&r2=1061400&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml (original)
+++ tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml Thu Jan 20 
17:14:00 2011
@@ -76,6 +76,11 @@
   <subsection name="Coyote">
     <changelog>
       <fix>
+        <bug>47913</bug>: Return the IP address rather than null for
+        <code>getRemoteHost()</code> with the APR connector if the IP address
+        does not resolve. (markt)
+      </fix>
+      <fix>
         <bug>49521</bug>: Disable scanning for a free port in Jk AJP/1.3
         connector by default. Do not change maxPort field value of 
ChannelSocket
         in its <code>setPort()</code> and <code>init()</code> methods. Add



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to