mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Fix a bug in the input handling. ap_http_filter() was modifying *readbytes
which corresponded to r->remaining (in ap_get_client_block). However, ap_get_client_block was *also* adjusting r->remaining. Net result was that PUT (and probably POST) was broken. (at least on large inputs) To fix it, I simply removed the indirection on "readbytes" for input filters. There is no reason for them to return data (the brigade length is the return length). This also simplifies a number of calls where people needed to do &zero just to pass zero. I also added a number of comments about operations and where things could be improved, or are (semi) broken. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89008 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -367,7 +367,6 @@ static void check_pipeline_flush(request_rec *r)
|
||||
### allow us to defer creation of the brigade to when we actually
|
||||
### need to send a FLUSH. */
|
||||
apr_bucket_brigade *bb = apr_brigade_create(r->pool);
|
||||
apr_size_t zero = 0;
|
||||
|
||||
/* Flush the filter contents if:
|
||||
*
|
||||
@@ -375,8 +374,9 @@ static void check_pipeline_flush(request_rec *r)
|
||||
* 2) there isn't a request ready to be read
|
||||
*/
|
||||
/* ### shouldn't this read from the connection input filters? */
|
||||
/* ### is zero correct? that means "read one line" */
|
||||
if (!r->connection->keepalive ||
|
||||
ap_get_brigade(r->input_filters, bb, AP_MODE_PEEK, &zero) != APR_SUCCESS) {
|
||||
ap_get_brigade(r->input_filters, bb, AP_MODE_PEEK, 0) != APR_SUCCESS) {
|
||||
apr_bucket *e = apr_bucket_flush_create();
|
||||
|
||||
/* We just send directly to the connection based filters. At
|
||||
|
Reference in New Issue
Block a user