private HttpServletRequest removeContentHeaders(final HttpServletRequest request) { // The decoded content is plain and generated dynamically, therefore the "Content-Encoding" and "Content-Length" // headers should be removed after after the processing. return new RemoveHttpHeadersWrapper(request, ImmutableSortedSet.orderedBy(String::compareToIgnoreCase) .add(HttpHeader.CONTENT_ENCODING.asString()) .add(HttpHeader.CONTENT_LENGTH.asString()) .build()); }