headerEntry = new AcceptHeaderEntry(current);
} catch (InvalidPatternException e) {
log.warn(e.toString());
continue;
}
MediaRange range = headerEntry.getRange();
if (range.getAsterixCount() > 0) {
continue;
}
StringBuffer buffer = new StringBuffer(40);
buffer.append("application/xml; stylesheet=");
try {
buffer.append(URLEncoder.encode(range.toString(), "utf-8"));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
buffer.append("; q=");
buffer.append(headerEntry.getQ() * 0.9f);