diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2015-12-23 20:46:43 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2015-12-23 20:46:43 +0100 |
commit | 8bbc156ca9a4bf3bfff8a9b7014a002808b1b7f0 (patch) | |
tree | 74808e169701195ce18498f4de6dcf35778464a6 /Bugzilla/CGI.pm | |
parent | c94abb0445d015c1bffcd7207eac6fd9a3a8371b (diff) | |
download | bugzilla-8bbc156ca9a4bf3bfff8a9b7014a002808b1b7f0.tar.gz bugzilla-8bbc156ca9a4bf3bfff8a9b7014a002808b1b7f0.tar.xz |
Bug 1201113: Support to run Bugzilla as a PSGI application
r=dylan
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r-- | Bugzilla/CGI.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index fcca0ec6a..25ee0acbe 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -66,7 +66,7 @@ sub new { # else we will be redirected outside Bugzilla. my $script_name = $self->script_name; $path_info =~ s/^\Q$script_name\E//; - if ($path_info) { + if ($script_name && $path_info) { print $self->redirect($self->url(-path => 0, -query => 1)); } } @@ -283,7 +283,7 @@ sub close_standby_message { print $self->multipart_end(); print $self->multipart_start(-type => $contenttype); } - else { + elsif (!$self->{_header_done}) { print $self->header($contenttype); } } @@ -356,6 +356,7 @@ sub header { Bugzilla::Hook::process('cgi_headers', { cgi => $self, headers => \%headers } ); + $self->{_header_done} = 1; return $self->SUPER::header(%headers) || ""; } |