Permalink
Browse files

Item14011: make sure HTTP2 is compressing HTML

Item13969: reverting parsing path_info as long as we don't have a better solution

the current one was beaking jsonrpc
  • Loading branch information...
1 parent 8bb4bad commit 8a048daee758c819ca46c480163cfedd6cf6cb31 MichaelDaum committed Mar 8, 2016
Showing with 4 additions and 6 deletions.
  1. +4 −6 core/lib/Foswiki.pm
View
@@ -811,7 +811,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';
@@ -850,7 +849,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;
@@ -2207,10 +2208,7 @@ sub new {
my $defaultweb = $query->param('defaultweb') || $Foswiki::cfg{UsersWebName};
# Scripts like rest, jsonrpc, don't use web/topic path.
- my $webtopic = '';
- unless ( $query->action() eq 'rest' || $query->action() eq 'jsonrpc' ) {
- $webtopic = urlDecode( $query->path_info() || '' );
- }
+ my $webtopic = urlDecode( $query->path_info() || '' );
my $topicOverride = '';
my $topic = $query->param('topic');

0 comments on commit 8a048da

Please sign in to comment.