Class ResponseCompressionAnalyzerImpl
java.lang.Object
org.apache.tapestry5.http.internal.services.ResponseCompressionAnalyzerImpl
- All Implemented Interfaces:
ResponseCompressionAnalyzer
-
Constructor Summary
ConstructorsConstructorDescriptionResponseCompressionAnalyzerImpl(javax.servlet.http.HttpServletRequest request, boolean gzipCompressionEnabled, CompressionAnalyzer compressionAnalyzer) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisGZipEnabled(ContentType contentType) UsesCompressionAnalyzerto determine if the content is compressable, but only if the request indicates the client supports compression.booleanChecks the Accept-Encoding request header for a "gzip" token.
-
Constructor Details
-
ResponseCompressionAnalyzerImpl
public ResponseCompressionAnalyzerImpl(javax.servlet.http.HttpServletRequest request, @Symbol("tapestry.gzip-compression-enabled") boolean gzipCompressionEnabled, CompressionAnalyzer compressionAnalyzer)
-
-
Method Details
-
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
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
-