aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla/CGI.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2016-03-21 23:18:07 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2016-03-21 23:18:07 +0100
commit6896e0469c6d9fd22252e2959da8bacb5ca99aa9 (patch)
treeac6a720e10076302b8cc780bfc038c364953dc1a /Bugzilla/CGI.pm
parent6e0182e55396213869186764abb1620dcbf307f0 (diff)
downloadbugs-6896e0469c6d9fd22252e2959da8bacb5ca99aa9.tar
bugs-6896e0469c6d9fd22252e2959da8bacb5ca99aa9.tar.gz
bugs-6896e0469c6d9fd22252e2959da8bacb5ca99aa9.tar.bz2
bugs-6896e0469c6d9fd22252e2959da8bacb5ca99aa9.tar.xz
bugs-6896e0469c6d9fd22252e2959da8bacb5ca99aa9.zip
Bug 1255619: CGI scripts should not send duplicated headers
r/a=dkl
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r--Bugzilla/CGI.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index 0b8a48697..44c089a20 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) || "";
}