]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport r1765061
authorGraham Leggett <minfrin@apache.org>
Wed, 1 Jan 2020 23:14:08 +0000 (23:14 +0000)
committerGraham Leggett <minfrin@apache.org>
Wed, 1 Jan 2020 23:14:08 +0000 (23:14 +0000)
ap_check_pipeline: clarify/simplify !max_blank_lines logic, no functional change.

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

CHANGES
STATUS
modules/http/http_request.c

diff --git a/CHANGES b/CHANGES
index db8738b66d7c721b5da5a22aa2a24aff6dd322f7..4954b123e144f162007e3b47da4454b03bf60aae 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.42
 
+  *) ap_check_pipeline: clarify/simplify !max_blank_lines logic, no functional change.
+     [Christophe Jaillet]
+
   *) mod_ssl: OCSP does not apply to proxy mode. [Yann Ylavic]
 
   *) mod_proxy_html, mod_xml2enc: Fix build issues with macOS due to r1864469
diff --git a/STATUS b/STATUS
index 4079d7c8206fb1a06a1d6a32bc2e90c63b412bbe..576362f2f6d9c540d5f39afdbb18490611696d7d 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -132,13 +132,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) ap_check_pipeline: clarify/simplify !max_blank_lines logic, no functional change.
-     trunk patch: http://svn.apache.org/r1765061
-     2.4.x patch: svn merge -c 1765061 ^/httpd/httpd/trunk .
-     +1: jailletc36, ylavic, minfrin
-     jailletc36: this is fine because if !max_blank_lines, we break at the first
-                 iteration, so we know that mode = AP_MODE_SPECULATIVE
-
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
index 9e7c4dbc5f5fbdac3e3c91f153afa2e999f19c89..c9ae5af2864d41532703ab8c9bb44213581b8da9 100644 (file)
@@ -249,7 +249,7 @@ AP_DECLARE(apr_status_t) ap_check_pipeline(conn_rec *c, apr_bucket_brigade *bb,
         apr_brigade_cleanup(bb);
         rv = ap_get_brigade(c->input_filters, bb, mode,
                             APR_NONBLOCK_READ, len);
-        if (rv != APR_SUCCESS || APR_BRIGADE_EMPTY(bb) || !max_blank_lines) {
+        if (rv != APR_SUCCESS || APR_BRIGADE_EMPTY(bb)) {
             if (mode == AP_MODE_READBYTES) {
                 /* Unexpected error, stop with this connection */
                 ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(02967)
@@ -257,23 +257,22 @@ AP_DECLARE(apr_status_t) ap_check_pipeline(conn_rec *c, apr_bucket_brigade *bb,
                 c->keepalive = AP_CONN_CLOSE;
                 rv = APR_EGENERAL;
             }
-            else if (rv != APR_SUCCESS || APR_BRIGADE_EMPTY(bb)) {
-                if (rv != APR_SUCCESS && !APR_STATUS_IS_EAGAIN(rv)) {
-                    /* Pipe is dead */
-                    c->keepalive = AP_CONN_CLOSE;
-                }
-                else {
-                    /* Pipe is up and empty */
-                    rv = APR_EAGAIN;
-                }
+            else if (rv != APR_SUCCESS && !APR_STATUS_IS_EAGAIN(rv)) {
+                /* Pipe is dead */
+                c->keepalive = AP_CONN_CLOSE;
             }
             else {
-                apr_off_t n = 0;
-                /* Single read asked, (non-meta-)data available? */
-                rv = apr_brigade_length(bb, 0, &n);
-                if (rv == APR_SUCCESS && n <= 0) {
-                    rv = APR_EAGAIN;
-                }
+                /* Pipe is up and empty */
+                rv = APR_EAGAIN;
+            }
+            break;
+        }
+        if (!max_blank_lines) {
+            apr_off_t n = 0;
+            /* Single read asked, (non-meta-)data available? */
+            rv = apr_brigade_length(bb, 0, &n);
+            if (rv == APR_SUCCESS && n <= 0) {
+                rv = APR_EAGAIN;
             }
             break;
         }