httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_protocol.c
Date Thu, 12 Oct 2000 19:30:14 GMT
gregames    00/10/12 12:30:13

  Modified:    src/main http_protocol.c
  Log:
  Make http_filter go a little faster.  Remove unused #define.
  
  Revision  Changes    Path
  1.165     +6 -10     apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.164
  retrieving revision 1.165
  diff -u -r1.164 -r1.165
  --- http_protocol.c	2000/10/12 16:35:39	1.164
  +++ http_protocol.c	2000/10/12 19:30:11	1.165
  @@ -862,7 +862,6 @@
   
   apr_status_t http_filter(ap_filter_t *f, ap_bucket_brigade *b, apr_ssize_t length)
   {
  -#define ASCII_CR '\015'
   #define ASCII_LF '\012'
       ap_bucket *e;
       char *buff;
  @@ -917,15 +916,12 @@
               return rv;
           }
   
  -        pos = buff;
  -        while (pos < buff + len) {
  -            if (*pos == ASCII_LF) {
  -                e->split(e, pos - buff + 1);
  -                bb = ap_brigade_split(b, AP_BUCKET_NEXT(e));
  -                ctx->b = bb;
  -                return APR_SUCCESS;
  -            }
  -            pos++;
  +        pos = memchr(buff, ASCII_LF, len);
  +        if (pos != NULL) {
  +            e->split(e, pos - buff + 1);
  +            bb = ap_brigade_split(b, AP_BUCKET_NEXT(e));
  +            ctx->b = bb;
  +            return APR_SUCCESS;
           }
       }
       return APR_SUCCESS;
  
  
  

Mime
View raw message