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/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=596761&r1=596760&r2=596761&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Nov 20 10:19:00 2007 @@ -26,11 +26,6 @@ [ New proposals should be added at the end of the list ] -* Fix BZ 43588 - hard coded 127.0.0.1 for localhost - http://people.apache.org/~jim/patches/tc-localhost.txt - +1: jim, pero, fhanik - -1: - * Add tests for the cookie parsing. http://people.apache.org/~jfclere/patches/test_cookies.patch +1: jfclere Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java?rev=596761&r1=596760&r2=596761&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java Tue Nov 20 10:19:00 2007 @@ -372,7 +372,7 @@ try { serverSocket = new ServerSocket(port, 1, - InetAddress.getByName("127.0.0.1")); + InetAddress.getByName("localhost").getHostAddress()); } catch (IOException e) { log.error("StandardServer.await: create[" + port + "]: ", e); 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()); OutputStream stream = socket.getOutputStream(); String shutdown = server.getShutdown(); for (int i = 0; i < shutdown.length(); i++) Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=596761&r1=596760&r2=596761&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Nov 20 10:19:00 2007 @@ -858,7 +858,7 @@ try { // Need to create a connection to unlock the accept(); if (address == null) { - s = new java.net.Socket("127.0.0.1", port); + s = new java.net.Socket(InetAddress.getByName("localhost").getHostAddress(), port); } else { s = new java.net.Socket(address, port); // setting soLinger to a small value will help shutdown the Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java?rev=596761&r1=596760&r2=596761&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java Tue Nov 20 10:19:00 2007 @@ -332,7 +332,7 @@ try { // Need to create a connection to unlock the accept(); if (address == null) { - s = new java.net.Socket("127.0.0.1", port); + s = new java.net.Socket(InetAddress.getByName("localhost").getHostAddress(), port); } else { s = new java.net.Socket(address, port); // setting soLinger to a small value will help shutdown the Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=596761&r1=596760&r2=596761&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Tue Nov 20 10:19:00 2007 @@ -581,7 +581,7 @@ try { // Need to create a connection to unlock the accept(); if (address == null) { - s = new Socket("127.0.0.1", port); + s = new Socket(InetAddress.getByName("localhost").getHostAddress(), port); } else { s = new Socket(address, port); // setting soLinger to a small value will help shutdown the Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=596761&r1=596760&r2=596761&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue Nov 20 10:19:00 2007 @@ -947,7 +947,7 @@ try { // Need to create a connection to unlock the accept(); if (address == null) { - s = new java.net.Socket("127.0.0.1", port); + s = new java.net.Socket(InetAddress.getByName("localhost").getHostAddress(), port); } else { s = new java.net.Socket(address, port); // setting soLinger to a small value will help shutdown the Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java?rev=596761&r1=596760&r2=596761&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java Tue Nov 20 10:19:00 2007 @@ -372,7 +372,7 @@ try { // Need to create a connection to unlock the accept(); if (inet == null) { - s = new Socket("127.0.0.1", port); + s = new Socket(InetAddress.getByName("localhost").getHostAddress(), port); } else { s = new Socket(inet, port); // setting soLinger to a small value will help shutdown the Modified: tomcat/tc6.0.x/trunk/res/tomcat.nsi URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/tomcat.nsi?rev=596761&r1=596760&r2=596761&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/res/tomcat.nsi (original) +++ tomcat/tc6.0.x/trunk/res/tomcat.nsi Tue Nov 20 10:19:00 2007 @@ -242,18 +242,18 @@ "http://tomcat.apache.org/" CreateShortCut "$SMPROGRAMS\Apache Tomcat 6.0\Welcome.lnk" \ - "http://127.0.0.1:$R0/" + "http://localhost:$R0/" ; IfFileExists "$INSTDIR\webapps\admin" 0 NoAdminApp ; ; CreateShortCut "$SMPROGRAMS\Apache Tomcat 6.0\Tomcat Administration.lnk" \ -; "http://127.0.0.1:$R0/admin/" +; "http://localhost:$R0/admin/" ;NoAdminApp: IfFileExists "$INSTDIR\webapps\manager" 0 NoManagerApp CreateShortCut "$SMPROGRAMS\Apache Tomcat 6.0\Tomcat Manager.lnk" \ - "http://127.0.0.1:$R0/manager/html" + "http://localhost:$R0/manager/html" NoManagerApp: --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]