You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2017/04/24 14:08:38 UTC
[4/5] incubator-trafficcontrol git commit: revert hostname lookup
back to remap creation
revert hostname lookup back to remap creation
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/476214c3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/476214c3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/476214c3
Branch: refs/heads/master
Commit: 476214c3105909831c0d901723bed469b2927b97
Parents: ed2fdce
Author: Derek Gelinas <de...@cable.comcast.com>
Authored: Sun Apr 23 19:24:38 2017 -0400
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Apr 24 08:00:24 2017 -0600
----------------------------------------------------------------------
traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/476214c3/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
index 70f6812..63a938c 100644
--- a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
+++ b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
@@ -2134,7 +2134,7 @@ sub remap_dot_config {
sub build_remap_line {
my $self = shift;
- my $profile_obj = shift;
+ my $server_obj = shift;
my $pdata = shift;
my $text = shift;
my $data = shift;
@@ -2150,7 +2150,7 @@ sub build_remap_line {
my $host_name = $data->{host_name};
my $dscp = $remap->{dscp};
- $map_from =~ s/ccr/__HOSTNAME__/;
+ $map_from =~ s/ccr/$host_name/;
if ( defined( $pdata->{'dscp_remap'} ) ) {
$text .= "map " . $map_from . " " . $map_to . " \@plugin=dscp_remap.so \@pparam=" . $dscp;
@@ -2169,7 +2169,7 @@ sub build_remap_line {
$text .= " \@plugin=regex_remap.so \@pparam=" . $dqs_file;
}
elsif ( $remap->{qstring_ignore} == 1 ) {
- my $global_exists = $self->profile_param_value( $profile_obj->id, 'cacheurl.config', 'location', undef );
+ my $global_exists = $self->profile_param_value( $server_obj->id, 'cacheurl.config', 'location', undef );
if ($global_exists) {
$self->app->log->debug(
"qstring_ignore == 1, but global cacheurl.config param exists, so skipping remap rename config_file=cacheurl.config parameter if you want to change"