summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Quantum
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-08-01 05:49:38 +0200
committerDylan William Hardison <dylan@hardison.net>2018-08-20 23:52:51 +0200
commit8dda66ee78df54d38d86c7e7ed0c8695fec78e40 (patch)
tree43b3d25625f984b77973533718b4a8bd49f4df2b /Bugzilla/Quantum
parentf9088d8cfaccf32674909db948be7d1400993acd (diff)
downloadbugzilla-8dda66ee78df54d38d86c7e7ed0c8695fec78e40.tar.gz
bugzilla-8dda66ee78df54d38d86c7e7ed0c8695fec78e40.tar.xz
add more debugging but also probably fix redirect problem
Diffstat (limited to 'Bugzilla/Quantum')
-rw-r--r--Bugzilla/Quantum/CGI.pm2
-rw-r--r--Bugzilla/Quantum/Plugin/Hostage.pm5
2 files changed, 6 insertions, 1 deletions
diff --git a/Bugzilla/Quantum/CGI.pm b/Bugzilla/Quantum/CGI.pm
index 7585d888a..0a74f1ee5 100644
--- a/Bugzilla/Quantum/CGI.pm
+++ b/Bugzilla/Quantum/CGI.pm
@@ -117,7 +117,7 @@ sub _ENV {
CONTENT_LENGTH => $content_length || 0,
CONTENT_TYPE => $headers->content_type || '',
GATEWAY_INTERFACE => 'CGI/1.1',
- HTTPS => $req->is_secure ? 'YES' : 'NO',
+ HTTPS => $req->is_secure ? 'on' : 'off',
%env_headers,
QUERY_STRING => $cgi_query->to_string,
PATH_INFO => $path_info ? "/$path_info" : '',
diff --git a/Bugzilla/Quantum/Plugin/Hostage.pm b/Bugzilla/Quantum/Plugin/Hostage.pm
index 19c77995e..cbde7b5ee 100644
--- a/Bugzilla/Quantum/Plugin/Hostage.pm
+++ b/Bugzilla/Quantum/Plugin/Hostage.pm
@@ -1,6 +1,7 @@
package Bugzilla::Quantum::Plugin::Hostage;
use 5.10.1;
use Mojo::Base 'Mojolicious::Plugin';
+use Bugzilla::Logging;
sub _attachment_root {
my ($base) = @_;
@@ -50,6 +51,7 @@ sub _before_routes {
return if $path eq '/__lbheartbeat__';
if ( $attachment_base && $hostname eq $attachment_root ) {
+ DEBUG("redirecting to $urlbase because $hostname is $attachment_root");
$c->redirect_to($urlbase);
return;
}
@@ -61,6 +63,7 @@ sub _before_routes {
my $new_uri = $url->clone;
$new_uri->scheme( $urlbase_uri->scheme );
$new_uri->host($urlbase_host);
+ DEBUG("redirecting to $new_uri because $hostname matches attachment regex");
$c->redirect_to($new_uri);
return;
}
@@ -69,10 +72,12 @@ sub _before_routes {
my $new_uri = $urlbase_uri->clone;
$new_uri->path('/show_bug.cgi');
$new_uri->query_form( id => $id );
+ DEBUG("redirecting to $new_uri because $hostname includes bug id");
$c->redirect_to($new_uri);
return;
}
else {
+ DEBUG("redirecting to $urlbase because $hostname doesn't make sense");
$c->redirect_to($urlbase);
return;
}