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