]> granicus.if.org Git - apache/commitdiff
Cleanup ap_get_client_block a bit. All of the code that I am removing
authorRyan Bloom <rbb@apache.org>
Sat, 14 Oct 2000 06:53:02 +0000 (06:53 +0000)
committerRyan Bloom <rbb@apache.org>
Sat, 14 Oct 2000 06:53:02 +0000 (06:53 +0000)
doesn't actually do anything useful, it was meant to remove all zero
length buckets before trying to read from the brigade.  However, it is
perfectly fine to not do this, and to just read those buckets along with
the rest of them.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86589 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_protocol.c

index 9f9aab4e30b32d83b3d7670c95918f3241b25136..59d319263db13645912485e23ffac7a27ee2e99c 100644 (file)
@@ -2420,36 +2420,6 @@ API_EXPORT(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz)
 
         bb = ap_brigade_create(r->pool);
 
-        do {
-            if (AP_BRIGADE_EMPTY(bb)) {
-                apr_getsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT, 
-                                 &timeout);
-                apr_setsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT,
-                                 0);
-                if (ap_get_brigade(r->input_filters, bb, 
-                                   len_to_read) != APR_SUCCESS) {
-                    /* if we actually fail here, we want to just return and
-                     * stop trying to read data from the client.
-                     */
-                    apr_setsocketopt(r->connection->client->bsock, 
-                                     APR_SO_TIMEOUT, timeout);
-                    r->connection->keepalive = -1;
-                    ap_brigade_destroy(bb);
-                    return -1;
-                }
-                apr_setsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT,
-                                 timeout);
-            }
-            b = AP_BRIGADE_FIRST(bb);
-            
-            while (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));
-
         total = 0;
         do {
             if (AP_BRIGADE_EMPTY(bb)) {