Changeset 2000

Show
Ignore:
Timestamp:
09/09/2007 11:00:53 PM (12 months ago)
Author:
jan
Message:

added support for If-Range: <date> (fixes #1346)

Location:
branches/lighttpd-1.4.x
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/lighttpd-1.4.x/NEWS

    r1998 r2000  
    66- 1.4.19 - 
    77 
    8   * 
     8  * added support for If-Range: <date> (#1346) 
    99 
    1010- 1.4.18 - 2007-09-09 
  • branches/lighttpd-1.4.x/src/mod_staticfile.c

    r1899 r2000  
    484484                         * otherwise a full 200 */ 
    485485 
    486                         if (!buffer_is_equal(ds->value, con->physical.etag)) { 
     486                        if (ds->value->ptr[0] == '"') { 
     487                                /** 
     488                                 * client wants a ETag 
     489                                 */ 
     490                                if (!con->physical.etag) { 
     491                                        do_range_request = 0; 
     492                                } else if (!buffer_is_equal(ds->value, con->physical.etag)) { 
     493                                        do_range_request = 0; 
     494                                } 
     495                        } else if (!mtime) { 
     496                                /** 
     497                                 * we don't have a Last-Modified and can match the If-Range:  
     498                                 * 
     499                                 * sending all 
     500                                 */ 
     501                                do_range_request = 0; 
     502                        } else if (!buffer_is_equal(ds->value, mtime)) { 
    487503                                do_range_request = 0; 
    488504                        }