[apache2] 02/02: mod_http2: Log HTTP/2 in access log

Stefan Fritsch sf at moszumanska.debian.org
Sat Oct 31 22:03:17 UTC 2015


This is an automated email from the git hooks/post-receive script.

sf pushed a commit to branch master
in repository apache2.

commit 36b5196d9f57f635c2af5c0474162ab606db9c19
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Sat Oct 31 22:57:00 2015 +0100

    mod_http2: Log HTTP/2 in access log
    
    Not HTTP/1.1
---
 debian/changelog                            |  1 +
 debian/patches/mod_http2_log_protocol.patch | 23 +++++++++++++++++++++++
 debian/patches/series                       |  1 +
 3 files changed, 25 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 5d16e9e..8759488 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ apache2 (2.4.17-2) UNRELEASED; urgency=medium
 
   * Revert REDIRECT_URL to pre-2.4.17 behavior for now. The change broke
     lots of web-apps. Closes: #803353
+  * mod_http2: Write HTTP/2 into THE_REQUEST and the access log.
 
  -- Stefan Fritsch <sf at debian.org>  Sat, 31 Oct 2015 22:51:31 +0100
 
diff --git a/debian/patches/mod_http2_log_protocol.patch b/debian/patches/mod_http2_log_protocol.patch
new file mode 100644
index 0000000..1210c53
--- /dev/null
+++ b/debian/patches/mod_http2_log_protocol.patch
@@ -0,0 +1,23 @@
+# Put HTTP/2 into THE_REQUEST, affecting the access log
+# https://svn.apache.org/r1708319
+--- apache2.orig/modules/http2/h2_task.c
++++ apache2/modules/http2/h2_task.c
+@@ -379,8 +379,6 @@ static request_rec *h2_task_create_reque
+     
+     /* Time to populate r with the data we have. */
+     r->request_time = apr_time_now();
+-    r->the_request = apr_psprintf(r->pool, "%s %s HTTP/1.1", 
+-                                  env->method, env->path);
+     r->method = env->method;
+     /* Provide quick information about the request method as soon as known */
+     r->method_number = ap_method_number_of(r->method);
+@@ -391,6 +389,9 @@ static request_rec *h2_task_create_reque
+     ap_parse_uri(r, env->path);
+     r->protocol = (char*)"HTTP/2";
+     r->proto_num = HTTP_VERSION(2, 0);
++
++    r->the_request = apr_psprintf(r->pool, "%s %s %s", 
++                                  r->method, env->path, r->protocol);
+     
+     /* update what we think the virtual host is based on the headers we've
+      * now read. may update status.
diff --git a/debian/patches/series b/debian/patches/series
index 0942c53..59ac3a5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ reproducible_builds.diff
 # This patch is applied manually
 #suexec-custom.patch
 revert-REDIRECT_URL.patch
+mod_http2_log_protocol.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git



More information about the Pkg-apache-commits mailing list