From: Stefan Eissing Date: Thu, 3 Nov 2016 17:27:06 +0000 (+0000) Subject: mod_proxy_http2: workaround for newly proposed 103 status code X-Git-Tag: 2.5.0-alpha~1034 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=009d1d0a5faf8f56d6d6a5fb27454691131bd806;p=thirdparty%2Fapache%2Fhttpd.git mod_proxy_http2: workaround for newly proposed 103 status code git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1767936 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 31b0fac848c..fcbc8d5aace 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_proxy_http2: adding support for newly proposed 103 status code. + [Stefan Eissing] + *) mpm_unix: Apache fails to start if previously crashed then restarted with the same PID (e.g. in container). PR 60261. [Val , Yann Ylavic] diff --git a/modules/http2/h2_proxy_session.c b/modules/http2/h2_proxy_session.c index 59ae9d48e29..a75e91a674c 100644 --- a/modules/http2/h2_proxy_session.c +++ b/modules/http2/h2_proxy_session.c @@ -161,7 +161,17 @@ static int on_frame_recv(nghttp2_session *ngh2, const nghttp2_frame *frame, ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "h2_proxy_session(%s): got interim HEADERS, status=%d", session->id, r->status); - r->status_line = ap_get_status_line(r->status); + switch(r->status) { + case 103: + /* workaround until we get this into http protocol base + * parts. without this, unknown codes are converted to + * 500... */ + r->status_line = "103 Early Hints"; + break; + default: + r->status_line = ap_get_status_line(r->status); + break; + } ap_send_interim_response(r, 1); } stream->waiting_on_100 = 0; diff --git a/modules/http2/h2_version.h b/modules/http2/h2_version.h index d9153a5660f..fcc8b70bfd6 100644 --- a/modules/http2/h2_version.h +++ b/modules/http2/h2_version.h @@ -26,7 +26,7 @@ * @macro * Version number of the http2 module as c string */ -#define MOD_HTTP2_VERSION "1.7.9-DEV" +#define MOD_HTTP2_VERSION "1.7.10-DEV" /** * @macro @@ -34,7 +34,7 @@ * release. This is a 24 bit number with 8 bits for major number, 8 bits * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203. */ -#define MOD_HTTP2_VERSION_NUM 0x010709 +#define MOD_HTTP2_VERSION_NUM 0x01070A #endif /* mod_h2_h2_version_h */