@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());
}