HttpParser { protected String caseInsensitiveHeader(String orig, String normative) { if (complianceSections.contains(HttpComplianceSection.FIELD_NAME_CASE_INSENSITIVE)) return normative; if (!orig.equals(normative)) handleViolation(HttpComplianceSection.FIELD_NAME_CASE_INSENSITIVE, orig); return orig; } HttpParser(RequestHandler handler);  HttpParser(ResponseHandler handler);  HttpParser(RequestHandler handler, int maxHeaderBytes);  HttpParser(ResponseHandler handler, int maxHeaderBytes); @Deprecated  HttpParser(RequestHandler handler, int maxHeaderBytes, boolean strict); @Deprecated  HttpParser(ResponseHandler handler, int maxHeaderBytes, boolean strict);  HttpParser(RequestHandler handler, HttpCompliance compliance);  HttpParser(RequestHandler handler, int maxHeaderBytes, HttpCompliance compliance);  HttpParser(ResponseHandler handler, int maxHeaderBytes, HttpCompliance compliance); private  HttpParser(RequestHandler requestHandler, ResponseHandler responseHandler, int maxHeaderBytes, HttpCompliance compliance); HttpHandler getHandler(); long getContentLength(); long getContentRead(); void setHeadResponse(boolean head); State getState(); boolean inContentState(); boolean inHeaderState(); boolean isChunking(); boolean isStart(); boolean isClose(); boolean isClosed(); boolean isIdle(); boolean isComplete(); boolean isState(State state); boolean parseNext(ByteBuffer buffer); boolean isAtEOF(); void atEOF(); void close(); void reset(); Trie<HttpField> getFieldCache(); @Override String toString(); static final LazyLogger LOG; @Deprecated
    final static String STRICT; final static int INITIAL_URI_LENGTH; final static Trie<HttpField> CACHE; }
@Test void testCaseInsensitiveHeader() { ByteBuffer buffer = BufferUtils.toBuffer( "GET / http/1.0\r\n" + "HOST: localhost\r\n" + "cOnNeCtIoN: ClOsE\r\n" + "\r\n"); HttpParser.RequestHandler handler = new Handler(); HttpParser parser = new HttpParser(handler, -1, HttpCompliance.RFC7230_LEGACY); parseAll(parser, buffer); assertNull(bad); assertEquals("GET", methodOrVersion); assertEquals("/", uriOrStatus); assertEquals("HTTP/1.0", versionOrReason); assertEquals("Host", hdr[0]); assertEquals("localhost", val[0]); assertEquals("Connection", hdr[1]); assertEquals("close", val[1]); assertEquals(1, headers); assertTrue(complianceViolation.isEmpty()); }