/src/main/java/org/htmlunit/util/EncodingSniffer.java
if ( i != ( -1) ) {   value = value.substring( 0, i) ; }
[Delete]
for (final NameValuePair pair : headers) { final String name = pair.getName(); if (HttpHeader.CONTENT_TYPE_LC.equalsIgnoreCase(name)) { String value = pair.getValue(); final int i = value.indexOf(';'); if (i != -1) { <extra_id_0> } value = value.trim().toLowerCase(Locale.ROOT); for (final String ending : contentTypeEndings) { if (value.endsWith(ending.toLowerCase(Locale.ROOT))) { return true; }