是Gzip支持的HttpServletRequest
//NowJava.com - 时代Java import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.zip.*; public class Main{ public static boolean isGzipSupported(HttpServletRequest request) { String encodings = request.getHeader("Accept-Encoding"); return ((encodings != null) && (encodings.indexOf("gzip") != -1)); } }