httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From field...@hyperreal.org
Subject cvs commit: apache-1.3/src/main http_protocol.c
Date Mon, 19 Jul 1999 10:16:04 GMT
fielding    99/07/19 03:16:04

  Modified:    src      CHANGES
               src/main http_protocol.c
  Log:
  Fix handling of case when a client has sent "Expect: 100-continue"
  and we are going to respond with an error, but get stuck waiting to
  discard the body in the pointless hope of preserving the connection.
  
  This remains less than satisfactory, since what we really should be
  doing is sending the response immediately and discarding the request
  body as some form of post-response cleanup.  Something to consider.
  
  PR: 4499, 3806
  Submitted by:	Roy Fielding, Joe Orton <jeo101@york.ac.uk>
  
  Revision  Changes    Path
  1.1397    +5 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1396
  retrieving revision 1.1397
  diff -u -r1.1396 -r1.1397
  --- CHANGES	1999/07/10 18:27:26	1.1396
  +++ CHANGES	1999/07/19 10:15:53	1.1397
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3.7
   
  +  *) Fix handling of case when a client has sent "Expect: 100-continue"
  +     and we are going to respond with an error, but get stuck waiting to
  +     discard the body in the pointless hope of preserving the connection.
  +     [Roy Fielding, Joe Orton <jeo101@york.ac.uk>] PR#4499, PR#3806
  +
     *) Fix 'configure' to work correctly with SysV-based versions of
        'tr' (consistent with Configure's use as well). [Jim Jagielski]
   
  
  
  
  1.272     +9 -5      apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.271
  retrieving revision 1.272
  diff -u -r1.271 -r1.272
  --- http_protocol.c	1999/07/03 07:59:49	1.271
  +++ http_protocol.c	1999/07/19 10:15:58	1.272
  @@ -1881,14 +1881,18 @@
       if ((rv = ap_setup_client_block(r, REQUEST_CHUNKED_PASS)))
           return rv;
   
  -    /* If we are discarding the request body, then we must already know
  -     * the final status code, therefore disable the sending of 100 continue.
  +    /* In order to avoid sending 100 Continue when we already know the
  +     * final response status, and yet not kill the connection if there is
  +     * no request body to be read, we need to duplicate the test from
  +     * ap_should_client_block() here negated rather than call it directly.
        */
  -    r->expecting_100 = 0;
  -
  -    if (ap_should_client_block(r)) {
  +    if ((r->read_length == 0) && (r->read_chunked || (r->remaining >
0))) {
           char dumpbuf[HUGE_STRING_LEN];
   
  +        if (r->expecting_100) {
  +            r->connection->keepalive = -1;
  +            return OK;
  +        }
           ap_hard_timeout("reading request body", r);
           while ((rv = ap_get_client_block(r, dumpbuf, HUGE_STRING_LEN)) > 0)
               continue;
  
  
  

Mime
View raw message