]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
We can use read_length instead of adding the new field begun_read_body.
authordgaudet <dgaudet@unknown>
Tue, 1 Jul 1997 06:50:30 +0000 (06:50 +0000)
committerdgaudet <dgaudet@unknown>
Tue, 1 Jul 1997 06:50:30 +0000 (06:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3@78488 13f79535-47bb-0310-9956-ffa450edef68

APACHE_1_2_X/src/include/httpd.h
APACHE_1_2_X/src/main/http_protocol.c
APACHE_1_2_X/src/main/http_request.c

index 24fd908358164c2200269ba9e915244ae49adf7c..deea1f015d45392ab2c906f8088378ba24739310 100644 (file)
@@ -472,7 +472,6 @@ struct request_rec {
   long read_length;            /* bytes that have been read */
   int read_body;               /* how the request body should be read */
   int read_chunked;            /* reading chunked transfer-coding */
-  int begun_read_body;         /* false (0) until first get_client_block */
 
   /* MIME header environments, in and out.  Also, an array containing
    * environment variables to be passed to subprocesses, so people can
index 681fdf606346bf2c41257c871e0070c7ddb9d8a9..ac143b0345091a17746fb58e9561e37dfa85c4d5 100644 (file)
@@ -868,7 +868,6 @@ void set_sub_req_protocol (request_rec *rnew, const request_rec *r)
     
     rnew->read_length = r->read_length;
     rnew->read_body   = REQUEST_NO_BODY;
-    rnew->begun_read_body = r->begun_read_body;
     
     rnew->main = (request_rec *)r;
 }
@@ -1346,7 +1345,7 @@ int setup_client_block (request_rec *r, int read_policy)
 
 int should_client_block (request_rec *r)
 {
-    if (r->begun_read_body || is_HTTP_ERROR(r->status))
+    if (r->read_length || is_HTTP_ERROR(r->status))
         return 0;
 
     if (!r->read_chunked && (r->remaining <= 0))
@@ -1398,8 +1397,6 @@ long get_client_block (request_rec *r, char *buffer, int bufsiz)
     long len_read, len_to_read;
     long chunk_start = 0;
 
-    r->begun_read_body = 1;
-
     if (!r->read_chunked) {                 /* Content-length read */
         len_to_read = (r->remaining > bufsiz) ? bufsiz : r->remaining;
         len_read = bread(r->connection->client, buffer, len_to_read);
index 515b6c336bbf9da9b6cd011f5c18892cd9bb7c43..c2d4884280121e272922e7234edaad90412ca251 100644 (file)
@@ -1095,7 +1095,7 @@ request_rec *internal_internal_redirect (const char *new_uri, request_rec *r)
                                  */
     new->no_local_copy = r->no_local_copy;
 
-    new->begun_read_body = r->begun_read_body;  /* We can only read it once */
+    new->read_length = r->read_length;  /* We can only read it once */
 
     ap_snprintf (t, sizeof(t), "%d", r->status);
     table_set (new->subprocess_env, "REDIRECT_STATUS", pstrdup (r->pool, t));