diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-06-23 20:34:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-23 20:34:55 +0200 |
commit | 8630521c3151c652143673b80fb7f1cc501687a7 (patch) | |
tree | 47bf47da68d4a519884c91e0cd0f808b899ee2b1 /Bugzilla/CGI.pm | |
parent | df042aa77951fa69ea59c1ced9feded43ba3ae6c (diff) | |
download | bugzilla-8630521c3151c652143673b80fb7f1cc501687a7.tar.gz bugzilla-8630521c3151c652143673b80fb7f1cc501687a7.tar.xz |
Bug 1361890 - Fix problems with current js and css concatenation
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r-- | Bugzilla/CGI.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 2402e997b..65e36a24f 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -441,12 +441,20 @@ sub header { %headers = ('-type' => shift(@_)); } else { - %headers = @_; + # we always want headers to be in lower case, to avoid + # for instance -Cache_Control vs. -cache_control. + my %tmp = @_; + foreach my $key (keys %tmp) { + my $lc_key = lc $key; + warn "duplicate header: $key" if exists $headers{$lc_key}; + $headers{$lc_key} = $tmp{$key}; + } } if ($self->{'_content_disp'}) { $headers{'-content_disposition'} = $self->{'_content_disp'}; } + $headers{'-cache_control'} //= 'no-cache, no-store, must-revalidate'; if (!$user->id && $user->authorizer->can_login && !$self->cookie('Bugzilla_login_request_cookie')) |