[Rt-commit] rt branch, 4.0/rt-server-display-name, created. rt-4.0.18-63-gebc9404

Alex Vandiver alexmv at bestpractical.com
Thu Nov 21 09:33:56 EST 2013


The branch, 4.0/rt-server-display-name has been created
        at  ebc94047bda030bd6881d641d1eab796197fe15e (commit)

- Log -----------------------------------------------------------------
commit ebc94047bda030bd6881d641d1eab796197fe15e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Nov 21 09:31:26 2013 -0500

    Fix server name used for display when under a path
    
    When RTSERVER="http://rt.example.org/rt", bin/rt displays
        "Password will be sent to rt.example.orgrt"
    
    Simplify the creation of $server, which is used only for display, to
    only include the host and port.  Resolves [issues #22708]

diff --git a/bin/rt.in b/bin/rt.in
index 6fe5473..09790a0 100644
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -1034,7 +1034,7 @@ sub submit {
 
     # Should we send authentication information to start a new session?
     my $how = $config{server} =~ /^https/ ? 'over SSL' : 'unencrypted';
-    (my $server = $config{server}) =~ s/^.*\/\/([^\/]+)\/?/$1/;
+    my($server) = $config{server} =~ m{^.*//([^/]+)};
     if ($config{externalauth}) {
         $h->authorization_basic($config{user}, $config{passwd} || read_passwd() );
         print "   Password will be sent to $server $how\n",
@@ -1079,7 +1079,7 @@ sub submit {
 
         # "RT/3.0.1 401 Credentials required"
         if ($status !~ m#^RT/\d+(?:\S+) (\d+) ([\w\s]+)$#) {
-            warn "rt: Malformed RT response from $config{server}.\n";
+            warn "rt: Malformed RT response from $server.\n";
             warn "(Rerun with RTDEBUG=3 for details.)\n" if $config{debug} < 3;
             exit -1;
         }

-----------------------------------------------------------------------


More information about the rt-commit mailing list