@ParameterizedTest
    @ArgumentsSource(ClientAndProtocolProvider.class)
    void testExpect100ContinueDoesNotBreakHttp1Decoder(WebClient client, SessionProtocol protocol)
            throws Exception {
        assumeThat(protocol).isSameAs(H1C);

        final int port = server.httpPort();
        try (Socket s = new Socket(NetUtil.LOCALHOST, port)) {
            s.setSoTimeout(Integer.MAX_VALUE);
            final InputStream in = s.getInputStream();
            final OutputStream out = s.getOutputStream();
            // Send 4 pipelined requests with 'Expect: 100-continue' header.
            out.write((Strings.repeat("POST /head-headers-only HTTP/1.1\r\n" +
                                      "Expect: 100-continue\r\n" +
                                      "Content-Length: 0\r\n\r\n", 3) +
                       "POST /head-headers-only HTTP/1.1\r\n" +
                       "Expect: 100-continue\r\n" +
                       "Content-Length: 0\r\n" +
                       "Connection: close\r\n\r\n").getBytes(StandardCharsets.US_ASCII));

            final StringBuilder responses = new StringBuilder();
            for (int i = 0; i < 4; i++) {
                responses.append("HTTP/1.1 100 Continue\r\n\r\n")
                         .append("HTTP/1.1 200 OK\r\n")
                         .append("content-type: text/plain; charset=utf-8\r\n")
                         .append("content-length: 6\r\n");
                if (i == 3) {
                    responses.append("connection: close\r\n");
                }
                responses.append("\r\n200 OK");
            }
            // '100 Continue' responses must appear once for each '200 OK' response.
            assertThat(new String(ByteStreams.toByteArray(in)))
                    .isEqualTo(responses.toString());
        }
    }
Similar to {@link #testTimeoutAfterPartialContent(WebClient)}, but tests the case where the service
produces a pooled buffers.
core/src/test/java/com/linecorp/armeria/server/HttpServerTest.java