diff options
Diffstat (limited to 'modules/http2/h2_switch.c')
-rw-r--r-- | modules/http2/h2_switch.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/http2/h2_switch.c b/modules/http2/h2_switch.c index a30f27ce9d..3799701723 100644 --- a/modules/http2/h2_switch.c +++ b/modules/http2/h2_switch.c @@ -104,9 +104,10 @@ static int h2_protocol_propose(conn_rec *c, request_rec *r, /* We also allow switching only for requests that have no body. */ p = apr_table_get(r->headers_in, "Content-Length"); - if (p && strcmp(p, "0")) { + if ((p && strcmp(p, "0")) + || (!p && apr_table_get(r->headers_in, "Transfer-Encoding"))) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03087) - "upgrade with content-length: %s, declined", p); + "upgrade with body declined"); return DECLINED; } } |