From dd1f86461a98afcd2699b5ec554ee810fc835fc4 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Wed, 20 Apr 2016 11:14:20 +0000 Subject: [PATCH] Merge: r1740108, r1740084, r1739932 from trunk mod_http2: disabling mmap on file buckets, changing r->protocol to HTTP/2.0 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1740112 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 8 +++++++- modules/http2/h2_request.c | 2 +- modules/http2/h2_session.c | 3 +++ modules/http2/h2_util.c | 9 ++++++--- modules/http2/h2_version.h | 4 ++-- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 459c6b3e3b..61fd6f3c5e 100644 --- a/CHANGES +++ b/CHANGES @@ -2,7 +2,13 @@ Changes with Apache 2.4.21 - + *) mod_http2: r->protocol changed to "HTTP/2.0" (was "HTTP/2") as this will + give expected syntax in CGI's SERVER_PROTOCOL is more compatible with + existing major/minor handling. Fixes PR 59313. + + *) mod_http2: disabling mmap for file buckets transport due to segmenation + faults when files change on the fly. + Changes with Apache 2.4.20 *) core: Do not read .htaccess if AllowOverride and AllowOverrideList diff --git a/modules/http2/h2_request.c b/modules/http2/h2_request.c index 2652661e78..3fd51d47d7 100644 --- a/modules/http2/h2_request.c +++ b/modules/http2/h2_request.c @@ -436,7 +436,7 @@ request_rec *h2_request_create_rec(const h2_request *req, conn_rec *conn) } ap_parse_uri(r, req->path); - r->protocol = "HTTP/2"; + r->protocol = "HTTP/2.0"; r->proto_num = HTTP_VERSION(2, 0); r->the_request = apr_psprintf(r->pool, "%s %s %s", diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c index 928bb4a673..84a4fe096c 100644 --- a/modules/http2/h2_session.c +++ b/modules/http2/h2_session.c @@ -2172,6 +2172,9 @@ apr_status_t h2_session_process(h2_session *session, int async) /* continue reading handling */ } else { + ap_log_cerror( APLOG_MARK, APLOG_TRACE1, status, c, + "h2_session(%ld): idle(1 sec timeout) " + "read failed", session->id); dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, "error"); } } diff --git a/modules/http2/h2_util.c b/modules/http2/h2_util.c index 06472425f2..f4e25fda36 100644 --- a/modules/http2/h2_util.c +++ b/modules/http2/h2_util.c @@ -454,7 +454,7 @@ apr_status_t h2_util_move(apr_bucket_brigade *to, apr_bucket_brigade *from, } if (!APR_BRIGADE_EMPTY(from)) { - apr_bucket *b, *end; + apr_bucket *b, *nb, *end; status = last_not_included(from, maxlen, same_alloc, pfile_buckets_allowed, &end); @@ -526,8 +526,11 @@ apr_status_t h2_util_move(apr_bucket_brigade *to, apr_bucket_brigade *from, return status; } } - apr_brigade_insert_file(to, fd, b->start, b->length, - to->p); + nb = apr_brigade_insert_file(to, fd, b->start, b->length, + to->p); +#if APR_HAS_MMAP + apr_bucket_file_enable_mmap(nb, 0); +#endif --(*pfile_buckets_allowed); } else { diff --git a/modules/http2/h2_version.h b/modules/http2/h2_version.h index d68130db71..452ccbfc19 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.4.6" +#define MOD_HTTP2_VERSION "1.4.8-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 0x010406 +#define MOD_HTTP2_VERSION_NUM 0x010408 #endif /* mod_h2_h2_version_h */ -- 2.40.0