Create input pipes only when stream has/may have a request body.
@@ -795,25 +795,21 @@ static apr_status_t c2_setup_io(h2_mplx *m, conn_rec *c2, h2_stream *stream, h2_
h2_beam_on_was_empty(conn_ctx->beam_out, c2_beam_output_write_notify, c2);
}
+ memset(&conn_ctx->pipe_in, 0, sizeof(conn_ctx->pipe_in));
if (stream->input) {
conn_ctx->beam_in = stream->input;
h2_beam_on_send(stream->input, c2_beam_input_write_notify, c2);
h2_beam_on_received(stream->input, c2_beam_input_read_notify, c2);
h2_beam_on_consumed(stream->input, c1_input_consumed, stream);
- }
-
#if H2_USE_PIPES
- if (!conn_ctx->pipe_in[H2_PIPE_OUT]) {
action = "create input write pipe";
rv = apr_file_pipe_create_pools(&conn_ctx->pipe_in[H2_PIPE_OUT],
&conn_ctx->pipe_in[H2_PIPE_IN],
APR_READ_BLOCK,
c2->pool, c2->pool);
if (APR_SUCCESS != rv) goto cleanup;
- }
-#else
- memset(&conn_ctx->pipe_in, 0, sizeof(conn_ctx->pipe_in));
#endif
+ }
cleanup:
stream->output = (APR_SUCCESS == rv)? conn_ctx->beam_out : NULL;
