Commit d1e54b34 authored by Reed Loden's avatar Reed Loden

Bug 575097 - "New STS header in Bugzilla::CGI causes malformed header error due…

Bug 575097 - "New STS header in Bugzilla::CGI causes malformed header error due to lack of Content-Type naming" [r=LpSolit a=LpSolit]
parent 4a85d6d1
...@@ -275,13 +275,14 @@ sub multipart_start { ...@@ -275,13 +275,14 @@ sub multipart_start {
sub header { sub header {
my $self = shift; my $self = shift;
# Add the cookies in if we have any # If there's only one parameter, then it's a Content-Type.
if (scalar(@{$self->{Bugzilla_cookie_list}})) {
if (scalar(@_) == 1) { if (scalar(@_) == 1) {
# if there's only one parameter, then it's a Content-Type. # Since we're adding parameters below, we have to name it.
# Since we're adding parameters we have to name it.
unshift(@_, '-type' => shift(@_)); unshift(@_, '-type' => shift(@_));
} }
# Add the cookies in if we have any
if (scalar(@{$self->{Bugzilla_cookie_list}})) {
unshift(@_, '-cookie' => $self->{Bugzilla_cookie_list}); unshift(@_, '-cookie' => $self->{Bugzilla_cookie_list});
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment