public ResponseContext filter(RequestContext request, FilterChain chain) {
String encoding = request.getHeader("Accept-Encoding");
String[] encodings = encoding != null ? ProviderHelper.orderByQ(encoding) : new String[0];
for (String enc : encodings) {
try {
CompressionCodec codec = CompressionCodec.valueOf(enc.toUpperCase());
return new CompressingResponseContextWrapper(chain.next(request), codec);
} catch (Exception e) {
}
}
return chain.next(request);