From 8630521c3151c652143673b80fb7f1cc501687a7 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Fri, 23 Jun 2017 14:34:55 -0400 Subject: Bug 1361890 - Fix problems with current js and css concatenation --- Bugzilla/CGI.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Bugzilla/CGI.pm') 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')) -- cgit v1.2.3-24-g4f1b