diff options
author | Yann Ylavic <ylavic@apache.org> | 2020-12-11 11:33:00 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2020-12-11 11:33:00 +0000 |
commit | 2bc917d4e9387188f19d38d1092ca64a3990d4a0 (patch) | |
tree | a754b95562046aab2fbbb5f9b733835171f01b50 /server/util_filter.c | |
parent | 4e4cf19efef9e835a3779f3456f461abf3c9326d (diff) | |
download | httpd-2bc917d4e9387188f19d38d1092ca64a3990d4a0.tar.gz |
Follow up to r1836032: better flush limits checks and description.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1884304 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util_filter.c')
-rw-r--r-- | server/util_filter.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/util_filter.c b/server/util_filter.c index c537b00f73..e012265305 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -1104,7 +1104,7 @@ AP_DECLARE(apr_status_t) ap_filter_reinstate_brigade(ap_filter_t *f, * sent to the client.) * * c) The brigade contains at least flush_max_pipelined EOR buckets: do - * blocking writes until the last EOR above flush_max_pipelined. + * blocking writes until after the last EOR above flush_max_pipelined. * (The point of this rule is to prevent too many FDs being kept open * by pipelined requests, possibly allowing a DoS). * @@ -1140,14 +1140,15 @@ AP_DECLARE(apr_status_t) ap_filter_reinstate_brigade(ap_filter_t *f, } if (APR_BUCKET_IS_FLUSH(bucket) - || memory_bytes_in_brigade >= conf->flush_max_threshold - || eor_buckets_in_brigade >= conf->flush_max_pipelined) { + || (memory_bytes_in_brigade > conf->flush_max_threshold) + || (conf->flush_max_pipelined >= 0 + && eor_buckets_in_brigade > conf->flush_max_pipelined)) { /* this segment of the brigade MUST be sent before returning. */ if (APLOGctrace6(f->c)) { char *reason = APR_BUCKET_IS_FLUSH(bucket) ? "FLUSH bucket" : - (memory_bytes_in_brigade >= conf->flush_max_threshold) ? + (memory_bytes_in_brigade > conf->flush_max_threshold) ? "max threshold" : "max requests in pipeline"; ap_log_cerror(APLOG_MARK, APLOG_TRACE6, 0, f->c, "will flush because of %s", reason); |