]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge /httpd/httpd/trunk:r1924554
authorStefan Eissing <icing@apache.org>
Tue, 3 Jun 2025 07:48:08 +0000 (07:48 +0000)
committerStefan Eissing <icing@apache.org>
Tue, 3 Jun 2025 07:48:08 +0000 (07:48 +0000)
  * mod_proxy_http2: revert r1912193 for detecting broken backend connections
    as this interferes with backend selection who a node is unresponsive.
    PR69624.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1926078 13f79535-47bb-0310-9956-ffa450edef68

changes-entries/pr69624.txt [new file with mode: 0644]
modules/http2/h2_proxy_session.c
modules/http2/h2_version.h
modules/http2/mod_proxy_http2.c

diff --git a/changes-entries/pr69624.txt b/changes-entries/pr69624.txt
new file mode 100644 (file)
index 0000000..74ee63a
--- /dev/null
@@ -0,0 +1,3 @@
+  * mod_proxy_http2: revert r1912193 for detecting broken backend connections
+    as this interferes with backend selection who a node is unresponsive.
+    PR69624.
index 3faa691c71f564261cb4772f1c64950df4579326..d5d0f9bc6bc6d0d178aeb15aa3a260a797963cb7 100644 (file)
@@ -1681,17 +1681,7 @@ static int done_iter(void *udata, void *val)
     h2_proxy_stream *stream = val;
     int touched = (stream->data_sent || stream->data_received ||
                    stream->id <= ctx->session->last_stream_id);
-    if (touched && stream->output) {
-      apr_bucket *b = ap_bucket_error_create(HTTP_BAD_GATEWAY, NULL,
-                                             stream->r->pool,
-                                             stream->cfront->bucket_alloc);
-      APR_BRIGADE_INSERT_TAIL(stream->output, b);
-      b = apr_bucket_eos_create(stream->cfront->bucket_alloc);
-      APR_BRIGADE_INSERT_TAIL(stream->output, b);
-      ap_pass_brigade(stream->r->output_filters, stream->output);
-    }
-    ctx->done(ctx->session, stream->r, APR_ECONNABORTED, touched,
-              stream->error_code);
+    ctx->done(ctx->session, stream->r, APR_ECONNABORTED, touched, stream->error_code);
     return 1;
 }
 
index 197a9f6ba4c4b467c108e03319cada3119142776..18b0b99d34d05068807839bd06e459cc0eb40188 100644 (file)
@@ -27,7 +27,7 @@
  * @macro
  * Version number of the http2 module as c string
  */
-#define MOD_HTTP2_VERSION "2.0.30"
+#define MOD_HTTP2_VERSION "2.0.31"
 
 /**
  * @macro
@@ -35,7 +35,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 0x02001e
+#define MOD_HTTP2_VERSION_NUM 0x02001f
 
 
 #endif /* mod_h2_h2_version_h */
index e5cb0babb598e48e3f2b5c6a0c6148064028c700..2881293d89241bd8f805ffd3cd2fcfc8e6059d29 100644 (file)
@@ -65,7 +65,7 @@ typedef struct h2_proxy_ctx {
     unsigned is_ssl : 1;
     
     request_rec *r;            /* the request processed in this ctx */
-    int r_status;              /* status of request work */
+    apr_status_t r_status;     /* status of request work */
     int r_done;                /* request was processed, not necessarily successfully */
     int r_may_retry;           /* request may be retried */
     int has_reusable_session;  /* http2 session is live and clean */
@@ -414,7 +414,7 @@ run_connect:
                       "setup new connection: is_ssl=%d %s %s %s", 
                       ctx->p_conn->is_ssl, ctx->p_conn->ssl_hostname, 
                       locurl, ctx->p_conn->hostname);
-        ctx->r_status = ap_map_http_request_error(status, HTTP_SERVICE_UNAVAILABLE);
+        ctx->r_status = status;
         goto cleanup;
     }
     
@@ -428,7 +428,7 @@ run_connect:
     if (ctx->cfront->aborted) goto cleanup;
     status = ctx_run(ctx);
 
-    if (ctx->r_status != OK && ctx->r_may_retry && !ctx->cfront->aborted) {
+    if (ctx->r_status != APR_SUCCESS && ctx->r_may_retry && !ctx->cfront->aborted) {
         /* Not successfully processed, but may retry, tear down old conn and start over */
         if (ctx->p_conn) {
             ctx->p_conn->close = 1;
@@ -464,12 +464,6 @@ cleanup:
     ap_set_module_config(ctx->cfront->conn_config, &proxy_http2_module, NULL);
     ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, ctx->cfront,
                   APLOGNO(03377) "leaving handler");
-    if (ctx->r_status != OK) {
-        ap_die(ctx->r_status, r);
-    }
-    else if (status != APR_SUCCESS) {
-        ap_die(ap_map_http_request_error(status, HTTP_SERVICE_UNAVAILABLE), r);
-    }
     return ctx->r_status;
 }