You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2017/05/02 16:36:34 UTC
[2/3] incubator-trafficcontrol git commit: adds secondary psql
qstring handling at profile level
adds secondary psql qstring handling at profile level
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/b37eabec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/b37eabec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/b37eabec
Branch: refs/heads/master
Commit: b37eabec1d6a13479af3109c666fae671a7d8ce2
Parents: 69b7cc4
Author: Derek Gelinas <de...@cable.comcast.com>
Authored: Tue May 2 11:00:20 2017 -0400
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Tue May 2 10:36:11 2017 -0600
----------------------------------------------------------------------
traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm | 10 +++++++++-
traffic_ops/app/lib/UI/ConfigFiles.pm | 10 +++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/b37eabec/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 d8c8199..6dff390 100644
--- a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
+++ b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
@@ -2008,9 +2008,17 @@ sub parent_dot_config {
$text .= "dest_domain=" . $org_uri->host . " port=" . $org_uri->port . " go_direct=true\n";
}
else {
+ # check for delivery service psel.qstring_handling. If this parameter is assigned to the delivery service profile,
+ # then edges will use the qstring handling value specified in the parameter for all profiles.
my $qsh = $ds->{'param'}->{'parent.config'}->{'psel.qstring_handling'};
+ # If there is no defined parameter in the delivery service, then check the server's profile.
+ # If psel.qstring_handling exists in the profile, then we use that value for the specified profile only.
+ # This is used only if not overridden by a delivery service profile qstring handling parameter.
+ if (!defined($qsh)) {
+ $qsh = $self->profile_param_value( $server_obj->profile->id, 'parent.config', 'psel.qstring_handling');
+ }
my $parent_qstring = defined($qsh) ? $qsh : "ignore";
- if ( $ds->{qstring_ignore} == 0 && !defined($qsh) ) {
+ if ( $remap->{qstring_ignore} == 0 && !defined($qsh) ) {
$parent_qstring = "consider";
}
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/b37eabec/traffic_ops/app/lib/UI/ConfigFiles.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/UI/ConfigFiles.pm b/traffic_ops/app/lib/UI/ConfigFiles.pm
index 765a71a..6880bad 100644
--- a/traffic_ops/app/lib/UI/ConfigFiles.pm
+++ b/traffic_ops/app/lib/UI/ConfigFiles.pm
@@ -1207,7 +1207,15 @@ sub parent_dot_config {
$text .= "dest_domain=" . $org_uri->host . " port=" . $org_uri->port . " go_direct=true\n";
}
else {
- my $qsh = $remap->{'param'}->{'parent.config'}->{'psel.qstring_handling'};
+ # check for delivery service psel.qstring_handling. If this parameter is assigned to the delivery service profile,
+ # then edges will use the qstring handling value specified in the parameter for all profiles.
+ my $qsh = $ds->{'param'}->{'parent.config'}->{'psel.qstring_handling'};
+ # If there is no defined parameter in the delivery service, then check the server's profile.
+ # If psel.qstring_handling exists in the profile, then we use that value for the specified profile only.
+ # This is used only if not overridden by a delivery service profile qstring handling parameter.
+ if (!defined($qsh)) {
+ $qsh = $self->profile_param_value( $server_obj->profile->id, 'parent.config', 'psel.qstring_handling');
+ }
my $parent_qstring = defined($qsh) ? $qsh : "ignore";
if ( $remap->{qstring_ignore} == 0 && !defined($qsh) ) {
$parent_qstring = "consider";