tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject svn commit: r369282 - /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java
Date Sun, 15 Jan 2006 23:44:44 GMT
Author: billbarker
Date: Sun Jan 15 15:44:41 2006
New Revision: 369282

URL: http://svn.apache.org/viewcvs?rev=369282&view=rev
Log:
Make certain that a valid Host name is set, or none at all.

I could have attempted IA.getByName(localAddr), but this requires a PA, so seemed like too
much trouble for an edge case.

Fix for Bug #38100


Modified:
    tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java

Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java
URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java?rev=369282&r1=369281&r2=369282&view=diff
==============================================================================
--- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java
(original)
+++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java
Sun Jan 15 15:44:41 2006
@@ -1080,6 +1080,13 @@
                 if (inetAddr != null) {
                     remoteHost = inetAddr.getHostName();
                 }
+                if(remoteHost == null) {
+                    if(remoteAddr != null) {
+                        remoteHost = remoteAddr;
+                    } else { // all we can do is punt
+                        request.remoteHost().recycle();
+                    }
+                }
             }
             request.remoteHost().setString(remoteHost);
 



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


Mime
View raw message