Summary: | mod_proxy buffers chunked data. | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | inder sabharwal <inders> |
Component: | mod_proxy | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | RESOLVED LATER | ||
Severity: | normal | Keywords: | MassUpdate |
Priority: | P2 | ||
Version: | 2.0.55 | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | Linux | ||
Attachments: | Proposed patch for Apache 2.0.59 |
Description
inder sabharwal
2005-11-15 21:50:31 UTC
I made the following changes to make mod_proxy work: 1006,1007d1005 < int chunked = 0; < char* c1=0; 1009,1014d1006 < c1 = apr_table_get(r->headers_out, "Transfer-Encoding"); < if (c1) { < ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, r->server, "->> encoding is: %s", c1); < if (!strcmp(c1, "chunked")) < chunked=1; < } 1046,1047c1038,1039 < if ( APR_STATUS_IS_EAGAIN(rv) < || (rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb)) ) { --- > if (APR_STATUS_IS_EAGAIN(rv) > || (rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb))) { 1051,1052c1043 < if (ap_pass_brigade(r->output_filters, bb) < || c->aborted) { --- > if (ap_pass_brigade(r->output_filters, bb)) { 1065,1077d1055 If chunked response, then flush right away. < < if (!APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb)) && chunked) { < e = apr_bucket_flush_create(c->bucket_alloc); < APR_BRIGADE_INSERT_TAIL(bb, e); < if (ap_pass_brigade(r->output_filters, bb) < || c->aborted) { < backend->close = 1; < break; < } < apr_brigade_cleanup(bb); < continue; < } < Streaming data works just fine, but apache LEAKS MEMORY - I believe apache is holding onto the stream unless either the browser is closed or the server closes the connection. Is there something obviously wrong that I am doing here, or is this an apache issue? -Thanks. -Inder. Your patch is currently a little hard to review. I guess it is against 2.1.x. Can you please 1. Provide the exact version of 2.1 where you faced the problem . 2. Provide the exact version where this patch is against. 3. Provide the patch as unified diff (see http://httpd.apache.org/dev/patches.html) as an attachment. Created attachment 20401 [details]
Proposed patch for Apache 2.0.59
This patch inserts a flush bucket after each block of chunk data received from
the web server. It will force a chunk block to be generated to the client
connection.
Feedback welcome.
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd. As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd. If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question. If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with. Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated. |