]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_http2: version bump, merge of authority default port handling for upgraded requests
authorStefan Eissing <icing@apache.org>
Mon, 7 Dec 2015 11:51:17 +0000 (11:51 +0000)
committerStefan Eissing <icing@apache.org>
Mon, 7 Dec 2015 11:51:17 +0000 (11:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1718318 13f79535-47bb-0310-9956-ffa450edef68

modules/http2/h2_request.c
modules/http2/h2_version.h

index bce58593c1557654cc47ddd463935c0e46a75c81..bf2d0c2e3ad2baa7730feb9c3987e4a67ae2ea7f 100644 (file)
@@ -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);
index b8ab5702bb863751b6d3244551dcbead89e565bd..77331cf46854d8bc95b2e4c120429efc08f9d2c9 100644 (file)
@@ -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 */