]> granicus.if.org Git - apache/commitdiff
On the trunk:
authorStefan Eissing <icing@apache.org>
Mon, 6 Mar 2017 15:45:05 +0000 (15:45 +0000)
committerStefan Eissing <icing@apache.org>
Mon, 6 Mar 2017 15:45:05 +0000 (15:45 +0000)
mod_proxy_http2: fixed retry behaviour when frontend connection uses
     http/1.1.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1785672 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http2/mod_proxy_http2.c

diff --git a/CHANGES b/CHANGES
index cf143aa541e0307edfcff1df38d2e6c4a7ca7ee7..b38ff85fa4316e2988c101a94cb9d8af1fd06fb3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_proxy_http2: fixed retry behaviour when frontend connection uses 
+     http/1.1. [Stefan Eissing]
+     
   *) mod_http2: separate mutex instances for each bucket beam, resulting in 
      less lock contention. input beams only created when necessary.
      [Stefan Eissing]
index 437fecc1c5a5a84567ca7425d1f9874368a96a22..f29f8c31248829f7c538c45af8683c44ef83b2cb 100644 (file)
@@ -276,6 +276,9 @@ static void request_done(h2_proxy_session *session, request_rec *r,
     h2_proxy_ctx *ctx = session->user_data;
     const char *task_id = apr_table_get(r->connection->notes, H2_TASK_ID_NOTE);
 
+    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, r->connection, 
+                  "h2_proxy_session(%s): request done %s, touched=%d",
+                  ctx->engine_id, task_id, touched);
     if (status != APR_SUCCESS) {
         if (!touched) {
             /* untouched request, need rescheduling */
@@ -289,6 +292,12 @@ static void request_done(h2_proxy_session *session, request_rec *r,
                     return;
                 }
             }
+            else if (!ctx->next) {
+                ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, r->connection, 
+                              "h2_proxy_session(%s): retry untouched request",
+                              ctx->engine_id);
+                ctx->next = r;
+            }
         }
         else {
             const char *uri;
@@ -606,7 +615,7 @@ run_session:
     }
 
 cleanup:
-    if (!reconnected && ctx->engine && next_request(ctx, 1) == APR_SUCCESS) {
+    if (!reconnected && next_request(ctx, 1) == APR_SUCCESS) {
         /* Still more to do, tear down old conn and start over */
         if (ctx->p_conn) {
             ctx->p_conn->close = 1;