Return-Path: Delivered-To: apmail-httpd-bugs-archive@www.apache.org Received: (qmail 94537 invoked from network); 9 Feb 2007 16:11:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Feb 2007 16:11:33 -0000 Received: (qmail 60829 invoked by uid 500); 9 Feb 2007 16:11:39 -0000 Delivered-To: apmail-httpd-bugs-archive@httpd.apache.org Received: (qmail 60788 invoked by uid 500); 9 Feb 2007 16:11:39 -0000 Mailing-List: contact bugs-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: "Apache HTTPD Bugs Notification List" List-Id: Delivered-To: mailing list bugs@httpd.apache.org Received: (qmail 60769 invoked by uid 99); 9 Feb 2007 16:11:39 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 08:11:39 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 08:11:31 -0800 Received: by brutus.apache.org (Postfix, from userid 33) id EB0ED7142D7; Fri, 9 Feb 2007 08:11:10 -0800 (PST) From: bugzilla@apache.org To: bugs@httpd.apache.org Subject: DO NOT REPLY [Bug 37920] - mod_proxy does not flush data on POST requests from client In-Reply-To: X-Bugzilla-Reason: AssignedTo Message-Id: <20070209161110.EB0ED7142D7@brutus.apache.org> Date: Fri, 9 Feb 2007 08:11:10 -0800 (PST) X-Virus-Checked: Checked by ClamAV on apache.org DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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=37920 rahul@sun.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Additional Comments From rahul@sun.com 2007-02-09 08:11 ------- The behavior is due to the following logic in mod_proxy_http.c We read the data using ap_get_bridade, Now ap_get_brigade will return an EOS only if the remaining data ( as calculated as content-length - current read in http_filters.c:ap_http_filter: [ lenp = apr_table_get(f->r->headers_in, "Content-Length");] ) is '0' Since our condition for exiting the while loop is APR_BUCKET_IS_EOS, we do not exit before reading the entire data as specified in content length. Since we do not write the data to the client side any where in this loop, the client never gets any data. The way to fix this would be to move up the part where we send the stream_reqbody_cl, and change it to keep sending the data to client side during the loop. --846 - 898 /* Prefetch MAX_MEM_SPOOL bytes * * This helps us avoid any election of C-L v.s. T-E * request bodies, since we are willing to keep in * memory this much data, in any case. This gives * us an instant C-L election if the body is of some * reasonable size. */ temp_brigade = apr_brigade_create(p, bucket_alloc); do { status = ap_get_brigade(r->input_filters, temp_brigade, AP_MODE_READBYTES, APR_BLOCK_READ, MAX_MEM_SPOOL - bytes_read); if (status != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server, "proxy: prefetch request body failed to %pI (%s)" " from %s (%s)", p_conn->addr, p_conn->hostname ? p_conn->hostname: "", c->remote_ip, c->remote_host ? c->remote_host: ""); return status; } apr_brigade_length(temp_brigade, 1, &bytes); bytes_read += bytes; /* * Save temp_brigade in input_brigade. (At least) in the SSL case * temp_brigade contains transient buckets whose data would get * overwritten during the next call of ap_get_brigade in the loop. * ap_save_brigade ensures these buckets to be set aside. * Calling ap_save_brigade with NULL as filter is OK, because * input_brigade already has been created and does not need to get * created by ap_save_brigade. */ status = ap_save_brigade(NULL, &input_brigade, &temp_brigade, p); if (status != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server, "proxy: processing prefetched request body failed" " to %pI (%s) from %s (%s)", p_conn->addr, p_conn->hostname ? p_conn->hostname: "", c->remote_ip, c->remote_host ? c->remote_host: ""); return status; } /* Ensure we don't hit a wall where we have a buffer too small * for ap_get_brigade's filters to fetch us another bucket, * surrender once we hit 80 bytes less than MAX_MEM_SPOOL * (an arbitrary value.) */ } while ((bytes_read < MAX_MEM_SPOOL - 80) && !APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(input_brigade))); /* Use chunked request body encoding or send a content-length body? -- 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