Return-Path: Delivered-To: apmail-incubator-beehive-commits-archive@www.apache.org Received: (qmail 59236 invoked from network); 15 Sep 2004 00:14:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Sep 2004 00:14:22 -0000 Received: (qmail 75501 invoked by uid 500); 15 Sep 2004 00:14:22 -0000 Delivered-To: apmail-incubator-beehive-commits-archive@incubator.apache.org Received: (qmail 75456 invoked by uid 500); 15 Sep 2004 00:14:21 -0000 Mailing-List: contact beehive-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Beehive Dev" Delivered-To: mailing list beehive-commits@incubator.apache.org Received: (qmail 75442 invoked by uid 500); 15 Sep 2004 00:14:21 -0000 Delivered-To: apmail-incubator-beehive-cvs@incubator.apache.org Received: (qmail 75439 invoked by uid 99); 15 Sep 2004 00:14:21 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 14 Sep 2004 17:14:21 -0700 Received: (qmail 59224 invoked by uid 65534); 15 Sep 2004 00:14:20 -0000 Date: 15 Sep 2004 00:14:20 -0000 Message-ID: <20040915001420.59222.qmail@minotaur.apache.org> From: rich@apache.org To: beehive-cvs@incubator.apache.org Subject: svn commit: rev 46053 - incubator/beehive/trunk/netui/test/src/testRecorder/org/apache/beehive/netui/tools/testrecorder/server X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: rich Date: Tue Sep 14 17:14:19 2004 New Revision: 46053 Modified: incubator/beehive/trunk/netui/test/src/testRecorder/org/apache/beehive/netui/tools/testrecorder/server/TestRecorderServlet.java Log: Changed TestRecorder so that when redirecting to a test URI, it replaces "localhost" with the current request's server name. This allows the use of the DRT test index pages from a remote machine. The idea is that if the config says the server is "localhost", then when you're displaying a link, you want that to resolve to the actual machine, not to the client's "localhost". DRT: netui (linux) BB: self (WinXP) Modified: incubator/beehive/trunk/netui/test/src/testRecorder/org/apache/beehive/netui/tools/testrecorder/server/TestRecorderServlet.java ============================================================================== --- incubator/beehive/trunk/netui/test/src/testRecorder/org/apache/beehive/netui/tools/testrecorder/server/TestRecorderServlet.java (original) +++ incubator/beehive/trunk/netui/test/src/testRecorder/org/apache/beehive/netui/tools/testrecorder/server/TestRecorderServlet.java Tue Sep 14 17:14:19 2004 @@ -507,8 +507,12 @@ forward( request, response, msg, Constants.ERROR_PAGE, true ); return; } - response.sendRedirect( rd.getUri( config.getServer().getHostname(), - config.getServer().getPort() ) ); + String host = config.getServer().getHostname(); + if ( host.equals( "localhost" ) ) + { + host = request.getServerName(); + } + response.sendRedirect( rd.getUri( host, config.getServer().getPort() ) ); return; } catch ( Exception e ) {