Skip to content

Commit

Permalink
Item14011: make sure HTTP2 is compressing HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum authored and gac410 committed Mar 19, 2016
1 parent 71a842b commit 50fa626
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/lib/Foswiki.pm
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 50fa626

Please sign in to comment.