HttpResponseDecoderSpec extends HttpDecoderSpec<HttpResponseDecoderSpec> { public HttpResponseDecoderSpec parseHttpAfterConnectRequest(boolean parseHttpAfterConnectRequest) { this.parseHttpAfterConnectRequest = parseHttpAfterConnectRequest; return this; } HttpResponseDecoderSpec(); @Override HttpResponseDecoderSpec get(); HttpResponseDecoderSpec failOnMissingResponse(boolean failOnMissingResponse); HttpResponseDecoderSpec parseHttpAfterConnectRequest(boolean parseHttpAfterConnectRequest); @Override boolean equals(Object o); @Override int hashCode(); static final boolean DEFAULT_FAIL_ON_MISSING_RESPONSE; static final boolean DEFAULT_PARSE_HTTP_AFTER_CONNECT_REQUEST; static final int DEFAULT_H2C_MAX_CONTENT_LENGTH; }
@Test public void parseHttpAfterConnectRequest() { conf.parseHttpAfterConnectRequest(true); assertThat(conf.parseHttpAfterConnectRequest).as("parse http after connect request").isTrue(); assertThat(conf.maxInitialLineLength()).as("default initial line length") .isEqualTo(HttpResponseDecoderSpec.DEFAULT_MAX_INITIAL_LINE_LENGTH); assertThat(conf.maxHeaderSize()).as("default header size") .isEqualTo(HttpResponseDecoderSpec.DEFAULT_MAX_HEADER_SIZE); assertThat(conf.maxChunkSize()).as("default chunk size") .isEqualTo(HttpResponseDecoderSpec.DEFAULT_MAX_CHUNK_SIZE); assertThat(conf.validateHeaders()).as("default validate headers") .isEqualTo(HttpResponseDecoderSpec.DEFAULT_VALIDATE_HEADERS); assertThat(conf.initialBufferSize()).as("default initial buffer sizes") .isEqualTo(HttpResponseDecoderSpec.DEFAULT_INITIAL_BUFFER_SIZE); assertThat(conf.failOnMissingResponse).as("default fail on missing response") .isEqualTo(HttpResponseDecoderSpec.DEFAULT_FAIL_ON_MISSING_RESPONSE); }