You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2005/05/11 22:36:29 UTC

DO NOT REPLY [Bug 34876] New: - mod_proxy buffers across chunk boundaries when returning data to the client using chunked encoding

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34876>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34876

           Summary: mod_proxy buffers across chunk boundaries when returning
                    data to the client using chunked encoding
           Product: Apache httpd-1.3
           Version: HEAD
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: jdperlow@alumni.princeton.edu


When using mod_proxy as a reverse proxy, I hit the case where it would buffer
accross chunk boundaries for chunks that are returned to the client. The data
will no be sent until the buffer limit is reached. This breaks certain classes
of web applications that return intermediate results over http over an extended
period of time.

The fix is to apply the following diff to proxy_util.c. This forces each chunk
to be flushed to the socket when the end of the chunk is reached.

--- proxy_util.c.prev   2005-05-11 13:29:13.000000000 -0700
+++ proxy_util.c        2005-05-11 13:30:25.000000000 -0700
@@ -605,6 +605,10 @@
 
             w = ap_bwrite(con->client, &buf[o], n);
 
+            if (chunked) {
+              ap_bflush(con->client);
+            }
+
             if (alternate_timeouts)
                 ap_kill_timeout(r);
             else

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org