Class ResponseCompressionAnalyzerImpl
- java.lang.Object
-
- org.apache.tapestry5.http.internal.services.ResponseCompressionAnalyzerImpl
-
- All Implemented Interfaces:
ResponseCompressionAnalyzer
public class ResponseCompressionAnalyzerImpl extends Object implements ResponseCompressionAnalyzer
-
-
Constructor Summary
Constructors Constructor Description ResponseCompressionAnalyzerImpl(HttpServletRequest request, boolean gzipCompressionEnabled, CompressionAnalyzer compressionAnalyzer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isGZipEnabled(ContentType contentType)
UsesCompressionAnalyzer
to determine if the content is compressable, but only if the request indicates the client supports compression.boolean
isGZipSupported()
Checks the Accept-Encoding request header for a "gzip" token.
-
-
-
Constructor Detail
-
ResponseCompressionAnalyzerImpl
public ResponseCompressionAnalyzerImpl(HttpServletRequest request, @Symbol("tapestry.gzip-compression-enabled") boolean gzipCompressionEnabled, CompressionAnalyzer compressionAnalyzer)
-
-
Method Detail
-
isGZipSupported
public boolean isGZipSupported()
Description copied from interface:ResponseCompressionAnalyzer
Checks the Accept-Encoding request header for a "gzip" token. Ensures that the protocol is not "HTTP/1.0", which does not correctly support GZip encoding (in older Internet Explorer browsers).- Specified by:
isGZipSupported
in interfaceResponseCompressionAnalyzer
- Returns:
- true if gzip is supported by client
-
isGZipEnabled
public boolean isGZipEnabled(ContentType contentType)
Description copied from interface:ResponseCompressionAnalyzer
UsesCompressionAnalyzer
to determine if the content is compressable, but only if the request indicates the client supports compression.- Specified by:
isGZipEnabled
in interfaceResponseCompressionAnalyzer
- Returns:
- true if the content can be compressed for the current request
-
-