tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jean-frederic clere <jfcl...@gmail.com>
Subject Re: svn commit: r596761 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/catalina/core/ java/org/apache/catalina/startup/ java/org/apache/tomcat/util/net/ res/
Date Mon, 26 Nov 2007 11:19:57 GMT
jim@apache.org wrote:
> Author: jim
> Date: Tue Nov 20 10:19:00 2007
> New Revision: 596761
> 
> URL: http://svn.apache.org/viewvc?rev=596761&view=rev
> Log:
> Fix BZ 43588 - hard coded 127.0.0.1 for localhost
> 
> Modified:
>     tomcat/tc6.0.x/trunk/STATUS.txt
>     tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java
>     tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java
>     tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
>     tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java
>     tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
>     tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
>     tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java
>     tomcat/tc6.0.x/trunk/res/tomcat.nsi
> 

> Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java
> URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java?rev=596761&r1=596760&r2=596761&view=diff
> ==============================================================================
> --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java (original)
> +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java Tue Nov 20 10:19:00
2007
> @@ -24,6 +24,7 @@
>  import java.io.IOException;
>  import java.io.InputStream;
>  import java.io.OutputStream;
> +import java.net.InetAddress;
>  import java.net.Socket;
>  import java.util.ArrayList;
>  import java.util.HashMap;
> @@ -416,7 +417,8 @@
>  
>          // Stop the existing server
>          try {
> -            Socket socket = new Socket("127.0.0.1", server.getPort());
> +            String hostAddress = InetAddress.getByName("localhost").getHostAddress();
> +            Socket socket = new Socket(hostAddress, server.getPort());

Why not using Socket socket = new Socket("localhost", server.getPort()); ?

Cheers

Jean-Frederic

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


Mime
View raw message