Index: configure.in =================================================================== --- configure.in (.../tags/lighttpd-1.4.18) (revision 2015) +++ configure.in (.../branches/lighttpd-1.4.x) (revision 2015) @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(lighttpd, 1.4.18, jan@kneschke.de) +AC_INIT(lighttpd, 1.4.19, jan@kneschke.de) AC_CONFIG_SRCDIR([src/server.c]) AC_CANONICAL_TARGET Index: src/configfile-glue.c =================================================================== --- src/configfile-glue.c (.../tags/lighttpd-1.4.18) (revision 2015) +++ src/configfile-glue.c (.../branches/lighttpd-1.4.x) (revision 2015) @@ -341,6 +341,10 @@ } break; } + case COMP_HTTP_SCHEME: + l = con->uri.scheme; + break; + case COMP_HTTP_URL: l = con->uri.path; break; Index: src/array.h =================================================================== --- src/array.h (.../tags/lighttpd-1.4.18) (revision 2015) +++ src/array.h (.../branches/lighttpd-1.4.x) (revision 2015) @@ -90,6 +90,7 @@ COMP_HTTP_COOKIE, COMP_HTTP_REMOTEIP, COMP_HTTP_QUERYSTRING, + COMP_HTTP_SCHEME, COMP_LAST_ELEMENT } comp_key_t; Index: src/mod_staticfile.c =================================================================== --- src/mod_staticfile.c (.../tags/lighttpd-1.4.18) (revision 2015) +++ src/mod_staticfile.c (.../branches/lighttpd-1.4.x) (revision 2015) @@ -483,8 +483,24 @@ /* 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; } } Index: src/response.c =================================================================== --- src/response.c (.../tags/lighttpd-1.4.18) (revision 2015) +++ src/response.c (.../branches/lighttpd-1.4.x) (revision 2015) @@ -180,6 +180,7 @@ buffer_copy_string_buffer(con->uri.authority, con->request.http_host); buffer_to_lower(con->uri.authority); + config_patch_connection(srv, con, COMP_HTTP_SCHEME); /* Scheme: */ config_patch_connection(srv, con, COMP_HTTP_HOST); /* Host: */ config_patch_connection(srv, con, COMP_HTTP_REMOTEIP); /* Client-IP */ config_patch_connection(srv, con, COMP_HTTP_REFERER); /* Referer: */ Index: src/configparser.y =================================================================== --- src/configparser.y (.../tags/lighttpd-1.4.18) (revision 2015) +++ src/configparser.y (.../branches/lighttpd-1.4.x) (revision 2015) @@ -422,6 +422,7 @@ { COMP_HTTP_COOKIE, CONST_STR_LEN("HTTP[\"cookie\"]" ) }, { COMP_HTTP_REMOTEIP, CONST_STR_LEN("HTTP[\"remoteip\"]" ) }, { COMP_HTTP_QUERYSTRING, CONST_STR_LEN("HTTP[\"querystring\"]") }, + { COMP_HTTP_SCHEME, CONST_STR_LEN("HTTP[\"scheme\"]" ) }, { COMP_UNSET, NULL, 0 }, }; size_t i; Index: doc/configuration.txt =================================================================== --- doc/configuration.txt (.../tags/lighttpd-1.4.18) (revision 2015) +++ doc/configuration.txt (.../branches/lighttpd-1.4.x) (revision 2015) @@ -85,6 +85,8 @@ $HTTP["cookie"] match on cookie +$HTTP["scheme"] + match on scheme $HTTP["host"] match on host $HTTP["useragent"] Index: NEWS =================================================================== --- NEWS (.../tags/lighttpd-1.4.18) (revision 2015) +++ NEWS (.../branches/lighttpd-1.4.x) (revision 2015) @@ -3,6 +3,11 @@ NEWS ==== +- 1.4.19 - + + * added support for If-Range: (#1346) + * added support for matching $HTTP["scheme"] in configs + - 1.4.18 - 2007-09-09 * fixed compile error on IRIX 6.5.x on prctl() (#1333)