From 50fa62638a6473130257f2e6f817ec4c5dc2b385 Mon Sep 17 00:00:00 2001 From: MichaelDaum Date: Tue, 8 Mar 2016 15:35:52 +0100 Subject: [PATCH] Item14011: make sure HTTP2 is compressing HTML --- core/lib/Foswiki.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/lib/Foswiki.pm b/core/lib/Foswiki.pm index eb32684f1e..f7722418f5 100644 --- a/core/lib/Foswiki.pm +++ b/core/lib/Foswiki.pm @@ -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;