From 2213f553de9bb632379f30502f7a55bdda489fbe Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Fri, 18 Jan 2019 14:14:17 +0100 Subject: [PATCH] * Fixed Bug introduce in v1.12.0 where mod_proxy_http2 no longer set the server name on new backend connections. --- ChangeLog | 2 ++ mod_http2/mod_proxy_http2.c | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7bdb4ad9..487d3713 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ v1.12.1 -------------------------------------------------------------------------------- + * Fixed Bug introduce in v1.12.0 where mod_proxy_http2 no longer set the server name + on new backend connections. * Fixed issue where mod_proxy_http2 would trigger an invalid internal state when retrying requests. * applied patch for #167 provided by Michael Kaufmann (@mkauf) about errors on HEAD requests (h2 streams not closed cleanly), for example those served by mod_cgid. diff --git a/mod_http2/mod_proxy_http2.c b/mod_http2/mod_proxy_http2.c index 3b618ef5..4ac93251 100644 --- a/mod_http2/mod_proxy_http2.c +++ b/mod_http2/mod_proxy_http2.c @@ -276,7 +276,7 @@ static void request_done(h2_proxy_ctx *ctx, request_rec *r, if (!touched) { /* untouched request, need rescheduling */ status = h2_proxy_fifo_push(ctx->requests, r); - ap_log_cerror(APLOG_MARK, APLOG_INFO, status, r->connection, + ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, r->connection, APLOGNO(03369) "h2_proxy_session(%s): rescheduled request %s", ctx->engine_id, task_id); @@ -583,6 +583,14 @@ static int proxy_http2_handler(request_rec *r, */ apr_table_setn(ctx->p_conn->connection->notes, "proxy-request-alpn-protos", "h2"); + if (ctx->p_conn->ssl_hostname) { + ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, ctx->owner, + "set SNI to %s for (%s)", + ctx->p_conn->ssl_hostname, + ctx->p_conn->hostname); + apr_table_setn(ctx->p_conn->connection->notes, + "proxy-request-hostname", ctx->p_conn->ssl_hostname); + } } }