HttpRequest { public Map<String, Collection<String>> headers() { return Collections.unmodifiableMap(this.hdrs); } HttpRequest(@NotNull final Socket socket); Map<String, Collection<String>> headers(); Map<String, Collection<String>> parameters(); URI requestUri(); String method(); Range range();  }
@Test public void fetchesCaseInsensitiveHeaders() throws Exception { final HttpRequest request = HttpRequestMocker.toRequest( "GET /test.html HTTP/1.1\nHost:local\nAccept:text/plain\n\nbody" ); MatcherAssert.assertThat( request.headers().get("Accept"), Matchers.hasItem("text/plain") ); MatcherAssert.assertThat( request.headers().get("ACCEPT"), Matchers.hasItem("text/plain") ); MatcherAssert.assertThat( request.headers().get("accept"), Matchers.hasItem("text/plain") ); MatcherAssert.assertThat( request.headers().get("aCcEpT"), Matchers.hasItem("text/plain") ); }