This is an automated email from the ASF dual-hosted git repository.

elsloo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git

commit e2c498f2f6125c46d9c6222e79aec0439786725e
Author: Matt Mills <mmi...@2bn.net>
AuthorDate: Tue Mar 6 10:22:54 2018 -0700

    Change UI route and test in QA, unsure why there is 3 copies of the same 
code
---
 traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm | 10 ++++++----
 traffic_ops/app/lib/UI/ConfigFiles.pm                  | 10 +++++++++-
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm 
b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
index 6a9992d..532c072 100755
--- a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
+++ b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
@@ -1890,10 +1890,11 @@ sub server_cache_dot_config {
                if ( $ds->{type} eq "HTTP_NO_CACHE" ) {
                        my $org_fqdn = $ds->{org};
                        $org_fqdn =~ s/https?:\/\///;
-                       $org_fqdn =~ m/.*?:(\d+).*/;
-                       my $org_port = $1;
+                       $org_fqdn =~ m/(.*?):(\d+).*/;
+                       my $org_port = $2;
 
                        if (defined($org_port)) {
+                               $org_fqdn = $1;
                                $text .= "dest_domain=" . $org_fqdn . " port=" 
. $org_port . " scheme=http action=never-cache\n";
                        } else {
                                $text .= "dest_domain=" . $org_fqdn . " 
scheme=http action=never-cache\n";
@@ -1925,10 +1926,11 @@ sub profile_cache_dot_config {
                if ( $ds->{type} eq "HTTP_NO_CACHE" ) {
                        my $org_fqdn = $ds->{org};
                        $org_fqdn =~ s/https?:\/\///;
-                       $org_fqdn =~ m/.*?:(\d+).*/;
-                       my $org_port = $1;
+                       $org_fqdn =~ m/(.*?):(\d+).*/;
+                       my $org_port = $2;
                        
                        if (defined($org_port)) {
+                               $org_fqdn = $1;
                                $text .= "dest_domain=" . $org_fqdn . " port=" 
. $org_port . " scheme=http action=never-cache\n";
                        } else {
                                $text .= "dest_domain=" . $org_fqdn . " 
scheme=http action=never-cache\n";
diff --git a/traffic_ops/app/lib/UI/ConfigFiles.pm 
b/traffic_ops/app/lib/UI/ConfigFiles.pm
index 27cc7e7..ae1c937 100644
--- a/traffic_ops/app/lib/UI/ConfigFiles.pm
+++ b/traffic_ops/app/lib/UI/ConfigFiles.pm
@@ -1013,7 +1013,15 @@ sub cache_dot_config {
                if ( $remap->{type} eq "HTTP_NO_CACHE" ) {
                        my $org_fqdn = $remap->{org};
                        $org_fqdn =~ s/https?:\/\///;
-                       $text .= "dest_domain=" . $org_fqdn . " scheme=http 
action=never-cache\n";
+                       $org_fqdn =~ m/(.*?):(\d+).*/;
+                       my $org_port = $2;
+
+                       if (defined($org_port)) {
+                               $org_fqdn = $1;
+                               $text .= "dest_domain=" . $org_fqdn . " port=" 
. $org_port . " scheme=http action=never-cache\n";
+                       } else { 
+                               $text .= "dest_domain=" . $org_fqdn . " 
scheme=http action=never-cache\n";
+                       }
                }
        }
        return $text;

-- 
To stop receiving notification emails like this one, please contact
els...@apache.org.

Reply via email to