From: Reed Loden Date: Sun, 27 Jun 2010 19:28:11 +0000 (-0500) Subject: Bug 575097 - "New STS header in Bugzilla::CGI causes malformed header error due to... X-Git-Tag: bugzilla-3.7.2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1e54b34322841477ec2236efd29af7c7213c118;p=thirdparty%2Fbugzilla.git Bug 575097 - "New STS header in Bugzilla::CGI causes malformed header error due to lack of Content-Type naming" [r=LpSolit a=LpSolit] --- diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 30f88bd5bc..12bbc5f00c 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}); }