httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/modules/http http_protocol.c
Date Thu, 09 Aug 2001 04:21:27 GMT
rbb         01/08/08 21:21:27

  Modified:    modules/http http_protocol.c
  Log:
  Handle the -1 case in ap_http_filter.  -1 means that we have to read
  all data from the socket until the socket is closed.  This has been
  used to proxy www.google.com successfully, but it doesn't return anything
  when used with www.yahoo.com.  Still debugging that problem.
  
  Revision  Changes    Path
  1.349     +14 -0     httpd-2.0/modules/http/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
  retrieving revision 1.348
  retrieving revision 1.349
  diff -u -r1.348 -r1.349
  --- http_protocol.c	2001/08/08 22:24:04	1.348
  +++ http_protocol.c	2001/08/09 04:21:26	1.349
  @@ -646,6 +646,20 @@
           }
       }
   
  +    if (*readbytes == -1) {
  +        apr_bucket *e;
  +        apr_off_t total;
  +        APR_BRIGADE_FOREACH(e, ctx->b) {
  +            const char *str;
  +            apr_size_t len;
  +            apr_bucket_read(e, &str, &len, APR_BLOCK_READ);
  +        }
  +        apr_brigade_length(b, 1, &total);
  +        *readbytes = total;
  +        e = apr_bucket_eos_create();
  +        APR_BRIGADE_INSERT_TAIL(b, e);
  +        return APR_SUCCESS;
  +    }
       /* readbytes == 0 is "read a single line". otherwise, read a block. */
       if (*readbytes) {
           apr_off_t total;
  
  
  

Mime
View raw message