httpHeader.setContentEncodingsSelected(true);
final ContentEncoding[] encodingsLibrary = contentEncodings.getArray();
if (encodingsLibrary == null) return;
final DataChunk bc =
httpHeader.getHeaders().getValue(Header.ContentEncoding);
final boolean isSomeEncodingApplied = bc != null && bc.getLength() > 0;
if (isSomeEncodingApplied && bc.equals("identity")) {
// remove the header as it's illegal to include the content-encoding
// header with a value of identity. Since the value is identity,
// return without applying any transformation.
httpHeader.getHeaders().removeHeader(Header.ContentEncoding);
return;