ASF Bugzilla – Attachment 35317 Details for
Bug 61222
Apache consumes too much memory for CGI output.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Send all read data down the chain
61222.diff (text/plain), 2.83 KB, created by
Ruediger Pluem
on 2017-09-12 07:21:58 UTC
(
hide
)
Description:
Send all read data down the chain
Filename:
MIME Type:
Creator:
Ruediger Pluem
Created:
2017-09-12 07:21:58 UTC
Size:
2.83 KB
patch
obsolete
>Index: server/protocol.c >=================================================================== >--- server/protocol.c (revision 1807989) >+++ server/protocol.c (working copy) >@@ -1725,40 +1725,39 @@ > * prior to this, and then read the data for this bucket. > */ > rv = apr_bucket_read(e, &ignored, &len, eblock); >+ if ((rv != APR_SUCCESS) && !APR_STATUS_IS_EAGAIN(rv)) { >+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00574) >+ "ap_content_length_filter: " >+ "apr_bucket_read() failed"); >+ return rv; >+ } > if (rv == APR_SUCCESS) { >+ /* include just read bucket in flush */ >+ e = APR_BUCKET_NEXT(e); > /* Attempt a nonblocking read next time through */ > eblock = APR_NONBLOCK_READ; > r->bytes_sent += len; > } > else if (APR_STATUS_IS_EAGAIN(rv)) { >- /* Output everything prior to this bucket, and then >- * do a blocking read on the next batch. >- */ >- if (e != APR_BRIGADE_FIRST(b)) { >- apr_bucket *flush; >- apr_brigade_split_ex(b, e, ctx->tmpbb); >- flush = apr_bucket_flush_create(r->connection->bucket_alloc); >+ eblock = APR_BLOCK_READ; >+ } >+ /* Output everything prior to this bucket, and then >+ * do a blocking read on the next batch. >+ */ >+ if (e != APR_BRIGADE_FIRST(b)) { >+ apr_brigade_split_ex(b, e, ctx->tmpbb); > >- APR_BRIGADE_INSERT_TAIL(b, flush); >- rv = ap_pass_brigade(f->next, b); >- if (rv != APR_SUCCESS || f->c->aborted) { >- return rv; >- } >- apr_brigade_cleanup(b); >- APR_BRIGADE_CONCAT(b, ctx->tmpbb); >- e = APR_BRIGADE_FIRST(b); >+ rv = ap_pass_brigade(f->next, b); >+ if (rv != APR_SUCCESS || f->c->aborted) { >+ return rv; >+ } >+ apr_brigade_cleanup(b); >+ APR_BRIGADE_CONCAT(b, ctx->tmpbb); >+ e = APR_BRIGADE_FIRST(b); > >- ctx->data_sent = 1; >- } >- eblock = APR_BLOCK_READ; >- continue; >+ ctx->data_sent = 1; > } >- else { >- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00574) >- "ap_content_length_filter: " >- "apr_bucket_read() failed"); >- return rv; >- } >+ continue; > } > else { > r->bytes_sent += e->length;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 61222
:
35316
| 35317 |
35321
|
35322
|
35323