@Test public void headersAreCaseInsensitive() throws Exception { StringBuffer sb = new StringBuffer(); NoOpBareResponse br = new NoOpBareResponse(sb); Response response = new ResponseImpl(br); ResponseHeaders headers = response.headers(); headers.addCookie("cookie1", "cookie-value-1"); headers.addCookie("cookie2", "cookie-value-2"); headers.add("Header", "hv1"); headers.add("header", "hv2"); headers.add("heaDer", "hv3"); assertHeaders(headers, "Set-Cookie","cookie1=cookie-value-1", "cookie2=cookie-value-2"); assertHeadersToMap(headers, "Set-Cookie","cookie1=cookie-value-1", "cookie2=cookie-value-2"); assertHeaders(headers, "set-cookie","cookie1=cookie-value-1", "cookie2=cookie-value-2"); assertHeadersToMap(headers, "set-cookie","cookie1=cookie-value-1", "cookie2=cookie-value-2"); assertHeaders(headers, "SET-CooKIE","cookie1=cookie-value-1", "cookie2=cookie-value-2"); assertHeadersToMap(headers, "SET-CooKIE","cookie1=cookie-value-1", "cookie2=cookie-value-2"); assertHeaders(headers, "header","hv1", "hv2", "hv3"); assertHeadersToMap(headers, "header","hv1", "hv2", "hv3"); assertHeaders(headers, "Header","hv1", "hv2", "hv3"); assertHeadersToMap(headers, "Header","hv1", "hv2", "hv3"); assertHeaders(headers, "HEADer","hv1", "hv2", "hv3"); assertHeadersToMap(headers, "HEADer","hv1", "hv2", "hv3"); }
@Override public ResponseHeaders headers() { return headers; }
Response implements ServerResponse { @Override public ResponseHeaders headers() { return headers; } }
Response implements ServerResponse { @Override public ResponseHeaders headers() { return headers; } Response(WebServer webServer, BareResponse bareResponse, List<MediaType> acceptedTypes);   Response(Response response); }
Response implements ServerResponse { @Override public ResponseHeaders headers() { return headers; } Response(WebServer webServer, BareResponse bareResponse, List<MediaType> acceptedTypes);   Response(Response response); @Override WebServer webServer(); @Override Http.ResponseStatus status(); @Override Response status(Http.ResponseStatus status); @Override ResponseHeaders headers(); @Override MessageBodyWriterContext writerContext(); @Override Void send(Throwable content); @Override Single<ServerResponse> send(T content); @Override Single<ServerResponse> send(Publisher<DataChunk> content); @Override Single<ServerResponse> send(Publisher<DataChunk> content, boolean applyFilters); @Override Single<ServerResponse> send(); @Override Single<ServerResponse> send(Publisher<T> content, Class<T> itemClass); @Override Single<ServerResponse> send(Function<MessageBodyWriterContext, Publisher<DataChunk>> function); @Override Response registerWriter(MessageBodyWriter<?> writer); @Override Response registerWriter(MessageBodyStreamWriter<?> writer); @Override Response registerFilter(MessageBodyFilter filter); @Override Response registerFilter(Function<Publisher<DataChunk>, Publisher<DataChunk>> function); @Override Response registerWriter(Class<T> type, Function<T, Publisher<DataChunk>> function); @Override Response registerWriter(Predicate<?> accept, Function<T, Publisher<DataChunk>> function); @Override Response registerWriter(Class<T> type, MediaType contentType,
            Function<? extends T, Publisher<DataChunk>> function); @Override Response registerWriter(Predicate<?> accept, MediaType contentType,
            Function<T, Publisher<DataChunk>> function); @Override Single<ServerResponse> whenSent(); @Override long requestId(); }
Response implements ServerResponse { @Override public ResponseHeaders headers() { return headers; } Response(WebServer webServer, BareResponse bareResponse, List<MediaType> acceptedTypes);   Response(Response response); @Override WebServer webServer(); @Override Http.ResponseStatus status(); @Override Response status(Http.ResponseStatus status); @Override ResponseHeaders headers(); @Override MessageBodyWriterContext writerContext(); @Override Void send(Throwable content); @Override Single<ServerResponse> send(T content); @Override Single<ServerResponse> send(Publisher<DataChunk> content); @Override Single<ServerResponse> send(Publisher<DataChunk> content, boolean applyFilters); @Override Single<ServerResponse> send(); @Override Single<ServerResponse> send(Publisher<T> content, Class<T> itemClass); @Override Single<ServerResponse> send(Function<MessageBodyWriterContext, Publisher<DataChunk>> function); @Override Response registerWriter(MessageBodyWriter<?> writer); @Override Response registerWriter(MessageBodyStreamWriter<?> writer); @Override Response registerFilter(MessageBodyFilter filter); @Override Response registerFilter(Function<Publisher<DataChunk>, Publisher<DataChunk>> function); @Override Response registerWriter(Class<T> type, Function<T, Publisher<DataChunk>> function); @Override Response registerWriter(Predicate<?> accept, Function<T, Publisher<DataChunk>> function); @Override Response registerWriter(Class<T> type, MediaType contentType,
            Function<? extends T, Publisher<DataChunk>> function); @Override Response registerWriter(Predicate<?> accept, MediaType contentType,
            Function<T, Publisher<DataChunk>> function); @Override Single<ServerResponse> whenSent(); @Override long requestId();  }