net.sf.ehcache.constructs.web
public final class ResponseUtil extends Object
Version: $Id: ResponseUtil.java 108 2006-06-04 12:44:06Z gregluck $
Method Summary | |
---|---|
static void | addGzipHeader(HttpServletResponse response)
Adds the gzip HTTP header to the response. |
static boolean | shouldBodyBeZero(HttpServletRequest request, int responseStatus)
Performs a number of checks to ensure response saneness according to the rules of RFC2616:
|
static boolean | shouldGzippedBodyBeZero(byte[] compressedBytes, HttpServletRequest request)
Checks whether a gzipped body is actually empty and should just be zero.
|
Parameters: response the response which will have a header added to it. I.e this method changes its parameter
Throws: ResponseHeadersNotModifiableException Either the response is committed or we were called using the include method from a javax.servlet.RequestDispatcher#include(javax.servlet.ServletRequest, javax.servlet.ServletResponse) method and the set set header is ignored.
Parameters: request the client HTTP request responseStatus the responseStatus
Returns: true if the response should be 0, even if it is isn't.
Parameters: compressedBytes the gzipped response body request the client HTTP request
Returns: true if the response should be 0, even if it is isn't.