Browse Source

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

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2000 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.19
Jan Kneschke 14 years ago
parent
commit
cb0f21c745
  1. 2
      NEWS
  2. 18
      src/mod_staticfile.c

2
NEWS

@ -5,7 +5,7 @@ NEWS
- 1.4.19 -
*
* added support for If-Range: <date> (#1346)
- 1.4.18 - 2007-09-09

18
src/mod_staticfile.c

@ -483,7 +483,23 @@ URIHANDLER_FUNC(mod_staticfile_subrequest) {
/* if the value is the same as our ETag, we do a Range-request,
* otherwise a full 200 */
if (!buffer_is_equal(ds->value, con->physical.etag)) {
if (ds->value->ptr[0] == '"') {
/**
* client wants a ETag
*/
if (!con->physical.etag) {
do_range_request = 0;
} else if (!buffer_is_equal(ds->value, con->physical.etag)) {
do_range_request = 0;
}
} else if (!mtime) {
/**
* we don't have a Last-Modified and can match the If-Range:
*
* sending all
*/
do_range_request = 0;
} else if (!buffer_is_equal(ds->value, mtime)) {
do_range_request = 0;
}
}

Loading…
Cancel
Save