From: Stefan Eissing Date: Mon, 7 Dec 2015 11:51:17 +0000 (+0000) Subject: mod_http2: version bump, merge of authority default port handling for upgraded requests X-Git-Tag: 2.4.18~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=458cd6f35b0f507c5a1aab72c22431138c723f52;p=thirdparty%2Fapache%2Fhttpd.git mod_http2: version bump, merge of authority default port handling for upgraded requests git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1718318 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http2/h2_request.c b/modules/http2/h2_request.c index bce58593c15..bf2d0c2e3ad 100644 --- a/modules/http2/h2_request.c +++ b/modules/http2/h2_request.c @@ -150,9 +150,13 @@ apr_status_t h2_request_rwrite(h2_request *req, request_rec *r) req->path = apr_uri_unparse(r->pool, &r->parsed_uri, APR_URI_UNP_OMITSITEPART); - if (!ap_strchr_c(req->authority, ':') && r->server) { - req->authority = apr_psprintf(r->pool, "%s:%d", req->authority, - (int)r->server->port); + if (!ap_strchr_c(req->authority, ':') && r->server && r->server->port) { + apr_port_t defport = apr_uri_port_of_scheme(req->scheme); + if (defport != r->server->port) { + /* port info missing and port is not default for scheme: append */ + req->authority = apr_psprintf(r->pool, "%s:%d", req->authority, + (int)r->server->port); + } } AP_DEBUG_ASSERT(req->scheme); diff --git a/modules/http2/h2_version.h b/modules/http2/h2_version.h index b8ab5702bb8..77331cf4685 100644 --- a/modules/http2/h2_version.h +++ b/modules/http2/h2_version.h @@ -20,7 +20,7 @@ * @macro * Version number of the h2 module as c string */ -#define MOD_HTTP2_VERSION "1.0.10" +#define MOD_HTTP2_VERSION "1.0.11-DEV" /** * @macro @@ -28,7 +28,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 0x01000a +#define MOD_HTTP2_VERSION_NUM 0x01000b #endif /* mod_h2_h2_version_h */