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 TypeMethodDescriptionboolean
isGZipEnabled
(ContentType contentType) UsesCompressionAnalyzer
to determine if the content is compressable, but only if the request indicates the client supports compression.boolean
Checks 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: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
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
-