httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: svn commit: r1678698 - in /httpd/httpd/branches/2.2.x: ./ STATUS modules/filters/mod_reqtimeout.c
Date Thu, 28 Jul 2016 23:28:49 GMT
On Fri, Jul 29, 2016 at 12:30 AM, Eric Covener <covener@gmail.com> wrote:
> I think this backport isn't helping in 2.2.x.  In 2.2
> check_pipeline_flush() doesn't use AP_MODE_SPECULATIVE :(
>
> I wonder what the risk is non-blocking mode-AP_MODE_EATCRLF to do the
> same thing.

Maybe a safer way to handle this in 2.2 could be something like:

Index: modules/filters/mod_reqtimeout.c
===================================================================
--- modules/filters/mod_reqtimeout.c    (revision 1754267)
+++ modules/filters/mod_reqtimeout.c    (working copy)
@@ -171,12 +171,10 @@ static apr_status_t reqtimeout_filter(ap_filter_t
         return ap_get_brigade(f->next, bb, mode, block, readbytes);
     }

-    if (block == APR_NONBLOCK_READ && mode == AP_MODE_SPECULATIVE) {
+    if (apr_table_get(f->c->notes, "check-pipeline")) {
         /*  The source of these above us in the core is check_pipeline(), which
          *  is between requests but before this filter knows to reset timeouts
-         *  during log_transaction().  If they appear elsewhere, just don't
-         *  check or extend the time since they won't block and we'll see the
-         *  bytes again later
+         *  during log_transaction().
          */
         return ap_get_brigade(f->next, bb, mode, block, readbytes);
     }
Index: modules/http/http_request.c
===================================================================
--- modules/http/http_request.c    (revision 1754267)
+++ modules/http/http_request.c    (working copy)
@@ -245,8 +245,12 @@ static void check_pipeline_flush(request_rec *r)
     /* ### shouldn't this read from the connection input filters? */
     /* ### is zero correct? that means "read one line" */
     if (r->connection->keepalive != AP_CONN_CLOSE) {
-        if (ap_get_brigade(r->input_filters, bb, AP_MODE_EATCRLF,
-                       APR_NONBLOCK_READ, 0) != APR_SUCCESS) {
+        apr_status_t rv;
+        apr_table_setn(c->notes, "check-pipeline", "1");
+        rv = ap_get_brigade(r->input_filters, bb, AP_MODE_EATCRLF,
+                            APR_NONBLOCK_READ, 0);
+        apr_table_unset(c->notes, "check-pipeline");
+        if (rv != APR_SUCCESS) {
             c->data_in_input_filters = 0;  /* we got APR_EOF or an error */
         }
         else {
_

Mime
View raw message