Permalink
Browse files

Item14011: make sure HTTP2 is compressing HTML

  • Loading branch information...
1 parent 71a842b commit 50fa62638a6473130257f2e6f817ec4c5dc2b385 MichaelDaum committed with gac410 Mar 8, 2016
Showing with 3 additions and 2 deletions.
  1. +3 −2 core/lib/Foswiki.pm
View
@@ -812,7 +812,6 @@ BOGUS
# Generate a zipped page, if the client accepts them
- # SMELL: $ENV{SPDY} is a non-standard way to detect spdy protocol
if ( my $encoding = _gzipAccepted() ) {
$hopts->{'Content-Encoding'} = $encoding;
$hopts->{'Vary'} = 'Accept-Encoding';
@@ -851,7 +850,9 @@ sub _gzipAccepted {
{
$encoding = $1;
}
- elsif ( $ENV{'SPDY'} ) {
+ elsif ( $ENV{'HTTP2'} ) {
+
+ # SMELL: $ENV{'HTTP2'} is a non-standard way to detect http2 protocol
$encoding = 'gzip';
}
return $encoding;

0 comments on commit 50fa626

Please sign in to comment.