]> granicus.if.org Git - apache/commitdiff
dechunk filter:
authorJeff Trawick <trawick@apache.org>
Mon, 16 Oct 2000 20:08:14 +0000 (20:08 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 16 Oct 2000 20:08:14 +0000 (20:08 +0000)
  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

modules/http/http_protocol.c

index 29e0e08e7789f4b4a720aaac21e03b9adeb7feb0..a3f1c29e4187ec65f9f893abe25d99a6054400ee 100644 (file)
@@ -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 */