From: Jeff Trawick Date: Mon, 16 Oct 2000 20:08:14 +0000 (+0000) Subject: dechunk filter: X-Git-Tag: APACHE_2_0_ALPHA_8~348 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=456c858fb2d21823835128cce9e88b12dcdef14f;p=apache dechunk filter: Get rid of an assertion which assumed that HTTP_IN is the filter below us. Some other filter may play the same role. ap_setup_client_block(): Get rid of a commented-out hack which was used to allow chunked transport encoding of a request body received by mod_cgi[d]. ap_get_client_block(): Get rid of special handling for zero-length buckets... The main loop handles that fine. Submitted by: Ryan Bloom git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86614 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 29e0e08e77..a3f1c29e41 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -903,7 +903,6 @@ apr_status_t dechunk_filter(ap_filter_t *f, ap_bucket_brigade *bb, */ char line[30]; - ap_debug_assert(!strcmp(f->next->frec->name, "HTTP_IN")); if ((rv = ap_get_brigade(f->next, bb, AP_GET_LINE)) != APR_SUCCESS) { return rv; } @@ -2363,11 +2362,6 @@ AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy) "Unknown Transfer-Encoding %s", tenc); return HTTP_NOT_IMPLEMENTED; } -/*XXX hack to use mod_cgi[d] for testing chunked request bodies XXX - if (r->read_body == REQUEST_CHUNKED_ERROR) { - r->read_body = REQUEST_CHUNKED_DECHUNK; - } - XXX end of this particular hack :) */ if (r->read_body == REQUEST_CHUNKED_ERROR) { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, "chunked Transfer-Encoding forbidden: %s", r->uri); @@ -2500,13 +2494,6 @@ AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz) apr_setsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT, timeout); } b = AP_BRIGADE_FIRST(bb); - while (!AP_BUCKET_IS_EOS(b) && b->length == 0 && - b != AP_BRIGADE_SENTINEL(bb)) { - ap_bucket *e = b; - b = AP_BUCKET_NEXT(e); - AP_BUCKET_REMOVE(e); - ap_bucket_destroy(e); - } } while (AP_BRIGADE_EMPTY(bb)); if (AP_BUCKET_IS_EOS(b)) { /* reached eos on previous invocation */