// Chunked encoding is no longer valid
List<String> encodings = httpRequest.getHeaders(HttpHeaders.Names.TRANSFER_ENCODING);
encodings.remove(HttpHeaders.Values.CHUNKED);
if (encodings.isEmpty()) {
httpRequest.removeHeader(HttpHeaders.Names.TRANSFER_ENCODING);
} else {
httpRequest.setHeader(HttpHeaders.Names.TRANSFER_ENCODING, encodings);
}
// The Connection and Keep-Alive headers are no longer valid