List of usage examples for io.netty.util AsciiString contentEqualsIgnoreCase
public boolean contentEqualsIgnoreCase(CharSequence string)
From source file:com.linecorp.armeria.internal.http.ArmeriaHttpUtil.java
License:Apache License
public static void toArmeria(io.netty.handler.codec.http.HttpHeaders inHeaders, HttpHeaders out) { final Iterator<Entry<CharSequence, CharSequence>> i = inHeaders.iteratorCharSequence(); while (i.hasNext()) { final Entry<CharSequence, CharSequence> entry = i.next(); final AsciiString aName = AsciiString.of(entry.getKey()).toLowerCase(); if (!HTTP_TO_HTTP2_HEADER_BLACKLIST.contains(aName)) { // https://tools.ietf.org/html/rfc7540#section-8.1.2.2 makes a special exception for TE if (aName.contentEqualsIgnoreCase(HttpHeaderNames.TE) && !AsciiString.contentEqualsIgnoreCase(entry.getValue(), HttpHeaderValues.TRAILERS)) { continue; }//from w w w . j a va 2 s. c o m out.add(aName, entry.getValue().toString()); } } }