]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 575097 - "New STS header in Bugzilla::CGI causes malformed header error due to...
authorReed Loden <reed@reedloden.com>
Sun, 27 Jun 2010 19:28:11 +0000 (14:28 -0500)
committerReed Loden <reed@reedloden.com>
Sun, 27 Jun 2010 19:28:11 +0000 (14:28 -0500)
[r=LpSolit a=LpSolit]

Bugzilla/CGI.pm

index 30f88bd5bcbc9768db82069e240e4744c8f8d122..12bbc5f00c86ec6e63bde8c3f78ea0655ca601e8 100644 (file)
@@ -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});
     }