summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorReed Loden <reed@reedloden.com>2010-06-27 21:28:11 +0200
committerReed Loden <reed@reedloden.com>2010-06-27 21:28:11 +0200
commitd1e54b34322841477ec2236efd29af7c7213c118 (patch)
treee66071ea810341aad32a0fcf6e67470631f3a35b /Bugzilla
parent4a85d6d1ead4cf6020148034425b7ea6de0f5899 (diff)
downloadbugzilla-d1e54b34322841477ec2236efd29af7c7213c118.tar.gz
bugzilla-d1e54b34322841477ec2236efd29af7c7213c118.tar.xz
Bug 575097 - "New STS header in Bugzilla::CGI causes malformed header error due to lack of Content-Type naming"
[r=LpSolit a=LpSolit]
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/CGI.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index 30f88bd5b..12bbc5f00 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -275,13 +275,14 @@ sub multipart_start {
sub header {
my $self = shift;
+ # If there's only one parameter, then it's a Content-Type.
+ if (scalar(@_) == 1) {
+ # Since we're adding parameters below, we have to name it.
+ unshift(@_, '-type' => shift(@_));
+ }
+
# Add the cookies in if we have any
if (scalar(@{$self->{Bugzilla_cookie_list}})) {
- if (scalar(@_) == 1) {
- # if there's only one parameter, then it's a Content-Type.
- # Since we're adding parameters we have to name it.
- unshift(@_, '-type' => shift(@_));
- }
unshift(@_, '-cookie' => $self->{Bugzilla_cookie_list});
}