rbb 00/12/07 17:26:35
Modified: modules/http http_protocol.c
include ap_buckets.h
Log:
Get Apache filters and Apr-util buckets using the same values for
blocking and non-blocking reads. This allows us to use the mode parameter
passed to a filter to read from the bucket correctly.
Revision Changes Path
1.255 +3 -3 httpd-2.0/modules/http/http_protocol.c
Index: http_protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
retrieving revision 1.254
retrieving revision 1.255
diff -u -r1.254 -r1.255
--- http_protocol.c 2000/12/07 00:17:52 1.254
+++ http_protocol.c 2000/12/08 01:26:31 1.255
@@ -891,7 +891,7 @@
*/
b = AP_BRIGADE_FIRST(bb);
while (b != AP_BRIGADE_SENTINEL(bb) && !AP_BUCKET_IS_EOS(b)) {
- ap_bucket_read(b, &buf, &len, AP_BLOCK_READ);
+ ap_bucket_read(b, &buf, &len, mode);
AP_DEBUG_ASSERT(len <= ctx->chunk_size - ctx->bytes_delivered);
ctx->bytes_delivered += len;
b = AP_BUCKET_NEXT(b);
@@ -966,7 +966,7 @@
while (e != AP_BRIGADE_SENTINEL(ctx->b)) {
const char *ignore;
- if ((rv = ap_bucket_read(e, &ignore, &len, AP_BLOCK_READ)) !=
APR_SUCCESS) {
+ if ((rv = ap_bucket_read(e, &ignore, &len, mode)) !=
APR_SUCCESS) {
/* probably APR_IS_EAGAIN(rv); socket state isn't correct;
* remove log once we get this squared away */
ap_log_error(APLOG_MARK, APLOG_ERR, rv, f->c->base_server,
@@ -1002,7 +1002,7 @@
while (!AP_BRIGADE_EMPTY(ctx->b)) {
e = AP_BRIGADE_FIRST(ctx->b);
- if ((rv = ap_bucket_read(e, (const char **)&buff, &len,
AP_BLOCK_READ)) != APR_SUCCESS) {
+ if ((rv = ap_bucket_read(e, (const char **)&buff, &len, mode)) !=
APR_SUCCESS) {
return rv;
}
1.56 +1 -1 apr-util/include/ap_buckets.h
Index: ap_buckets.h
===================================================================
RCS file: /home/cvs/apr-util/include/ap_buckets.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- ap_buckets.h 2000/12/06 04:42:34 1.55
+++ ap_buckets.h 2000/12/08 01:26:34 1.56
@@ -73,7 +73,7 @@
* @package Bucket Brigades
*/
-typedef enum {AP_NONBLOCK_READ, AP_BLOCK_READ} ap_read_type;
+typedef enum {AP_BLOCK_READ, AP_NONBLOCK_READ} ap_read_type;
/*
* The one-sentence buzzword-laden overview: Bucket brigades represent