httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: httpd-2.0/modules/http http_protocol.c
Date Mon, 22 Apr 2002 05:05:50 GMT
brianp      02/04/21 22:05:50

  Modified:    modules/http http_protocol.c
  Log:
  Optimization: short-circuit out of ap_set_byterange() more quickly if the
  client isn't requesting a range
  
  Revision  Changes    Path
  1.414     +12 -12    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.413
  retrieving revision 1.414
  diff -u -r1.413 -r1.414
  --- http_protocol.c	21 Apr 2002 07:55:50 -0000	1.413
  +++ http_protocol.c	22 Apr 2002 05:05:50 -0000	1.414
  @@ -2809,18 +2809,6 @@
           return 0;
       }
   
  -    /* is content already a single range? */
  -    if (apr_table_get(r->headers_out, "Content-Range")) {
  -       return 0;
  -    }
  -
  -    /* is content already a multiple range? */
  -    if ((ct = apr_table_get(r->headers_out, "Content-Type"))
  -        && (!strncasecmp(ct, "multipart/byteranges", 20)
  -            || !strncasecmp(ct, "multipart/x-byteranges", 22))) {
  -       return 0;
  -    }
  -
       /* Check for Range request-header (HTTP/1.1) or Request-Range for
        * backwards-compatibility with second-draft Luotonen/Franks
        * byte-ranges (e.g. Netscape Navigator 2-3).
  @@ -2837,6 +2825,18 @@
   
       if (!range || strncasecmp(range, "bytes=", 6)) {
           return 0;
  +    }
  +
  +    /* is content already a single range? */
  +    if (apr_table_get(r->headers_out, "Content-Range")) {
  +       return 0;
  +    }
  +
  +    /* is content already a multiple range? */
  +    if ((ct = apr_table_get(r->headers_out, "Content-Type"))
  +        && (!strncasecmp(ct, "multipart/byteranges", 20)
  +            || !strncasecmp(ct, "multipart/x-byteranges", 22))) {
  +       return 0;
       }
   
       /* Check the If-Range header for Etag or Date.
  
  
  

Mime
View raw message