Class ResponseCompressionAnalyzerImpl
- java.lang.Object
-
- org.apache.tapestry5.http.internal.services.ResponseCompressionAnalyzerImpl
-
- All Implemented Interfaces:
ResponseCompressionAnalyzer
public class ResponseCompressionAnalyzerImpl extends java.lang.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 booleanisGZipEnabled(ContentType contentType)UsesCompressionAnalyzerto determine if the content is compressable, but only if the request indicates the client supports compression.booleanisGZipSupported()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:ResponseCompressionAnalyzerChecks 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:
isGZipSupportedin interfaceResponseCompressionAnalyzer- Returns:
- true if gzip is supported by client
-
isGZipEnabled
public boolean isGZipEnabled(ContentType contentType)
Description copied from interface:ResponseCompressionAnalyzerUsesCompressionAnalyzerto determine if the content is compressable, but only if the request indicates the client supports compression.- Specified by:
isGZipEnabledin interfaceResponseCompressionAnalyzer- Returns:
- true if the content can be compressed for the current request
-
-