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-04 18:25:43 +0200
commit43837b61eaf9bc76adadbf8b515522bdb757c67b (patch)
tree26fb168161e212cd31f260d5d6ceec95fa597da4 /Bugzilla/Quantum
parent2397c5e491cc626a90e4f65bfd86044831121570 (diff)
downloadbugzilla-43837b61eaf9bc76adadbf8b515522bdb757c67b.tar.gz
bugzilla-43837b61eaf9bc76adadbf8b515522bdb757c67b.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;
}