]>
Commit | Line | Data |
---|---|---|
09cf44bb ER |
1 | Index: src/configfile-glue.c |
2 | =================================================================== | |
3 | --- src/configfile-glue.c (.../tags/lighttpd-1.4.18) (revision 2015) | |
4 | +++ src/configfile-glue.c (.../branches/lighttpd-1.4.x) (revision 2015) | |
5 | @@ -341,6 +341,10 @@ | |
6 | } | |
7 | break; | |
8 | } | |
9 | + case COMP_HTTP_SCHEME: | |
10 | + l = con->uri.scheme; | |
11 | + break; | |
12 | + | |
13 | case COMP_HTTP_URL: | |
14 | l = con->uri.path; | |
15 | break; | |
16 | Index: src/array.h | |
17 | =================================================================== | |
18 | --- src/array.h (.../tags/lighttpd-1.4.18) (revision 2015) | |
19 | +++ src/array.h (.../branches/lighttpd-1.4.x) (revision 2015) | |
20 | @@ -90,6 +90,7 @@ | |
21 | COMP_HTTP_COOKIE, | |
22 | COMP_HTTP_REMOTEIP, | |
23 | COMP_HTTP_QUERYSTRING, | |
24 | + COMP_HTTP_SCHEME, | |
25 | ||
26 | COMP_LAST_ELEMENT | |
27 | } comp_key_t; | |
a9c05e12 | 28 | Index: src/mod_staticfile.c |
cc1350fa | 29 | =================================================================== |
09cf44bb ER |
30 | --- src/mod_staticfile.c (.../tags/lighttpd-1.4.18) (revision 2015) |
31 | +++ src/mod_staticfile.c (.../branches/lighttpd-1.4.x) (revision 2015) | |
32 | @@ -483,8 +483,24 @@ | |
33 | /* if the value is the same as our ETag, we do a Range-request, | |
34 | * otherwise a full 200 */ | |
35 | ||
36 | - if (!buffer_is_equal(ds->value, con->physical.etag)) { | |
37 | + if (ds->value->ptr[0] == '"') { | |
38 | + /** | |
39 | + * client wants a ETag | |
40 | + */ | |
41 | + if (!con->physical.etag) { | |
42 | + do_range_request = 0; | |
43 | + } else if (!buffer_is_equal(ds->value, con->physical.etag)) { | |
44 | + do_range_request = 0; | |
45 | + } | |
46 | + } else if (!mtime) { | |
47 | + /** | |
48 | + * we don't have a Last-Modified and can match the If-Range: | |
49 | + * | |
50 | + * sending all | |
51 | + */ | |
52 | do_range_request = 0; | |
53 | + } else if (!buffer_is_equal(ds->value, mtime)) { | |
54 | + do_range_request = 0; | |
cc1350fa | 55 | } |
cc1350fa | 56 | } |
cc1350fa | 57 | |
09cf44bb ER |
58 | Index: src/response.c |
59 | =================================================================== | |
60 | --- src/response.c (.../tags/lighttpd-1.4.18) (revision 2015) | |
61 | +++ src/response.c (.../branches/lighttpd-1.4.x) (revision 2015) | |
62 | @@ -180,6 +180,7 @@ | |
63 | buffer_copy_string_buffer(con->uri.authority, con->request.http_host); | |
64 | buffer_to_lower(con->uri.authority); | |
65 | ||
66 | + config_patch_connection(srv, con, COMP_HTTP_SCHEME); /* Scheme: */ | |
67 | config_patch_connection(srv, con, COMP_HTTP_HOST); /* Host: */ | |
68 | config_patch_connection(srv, con, COMP_HTTP_REMOTEIP); /* Client-IP */ | |
69 | config_patch_connection(srv, con, COMP_HTTP_REFERER); /* Referer: */ | |
70 | Index: src/configparser.y | |
71 | =================================================================== | |
72 | --- src/configparser.y (.../tags/lighttpd-1.4.18) (revision 2015) | |
73 | +++ src/configparser.y (.../branches/lighttpd-1.4.x) (revision 2015) | |
74 | @@ -422,6 +422,7 @@ | |
75 | { COMP_HTTP_COOKIE, CONST_STR_LEN("HTTP[\"cookie\"]" ) }, | |
76 | { COMP_HTTP_REMOTEIP, CONST_STR_LEN("HTTP[\"remoteip\"]" ) }, | |
77 | { COMP_HTTP_QUERYSTRING, CONST_STR_LEN("HTTP[\"querystring\"]") }, | |
78 | + { COMP_HTTP_SCHEME, CONST_STR_LEN("HTTP[\"scheme\"]" ) }, | |
79 | { COMP_UNSET, NULL, 0 }, | |
80 | }; | |
81 | size_t i; | |
82 | Index: doc/configuration.txt | |
83 | =================================================================== | |
84 | --- doc/configuration.txt (.../tags/lighttpd-1.4.18) (revision 2015) | |
85 | +++ doc/configuration.txt (.../branches/lighttpd-1.4.x) (revision 2015) | |
86 | @@ -85,6 +85,8 @@ | |
87 | ||
88 | $HTTP["cookie"] | |
89 | match on cookie | |
90 | +$HTTP["scheme"] | |
91 | + match on scheme | |
92 | $HTTP["host"] | |
93 | match on host | |
94 | $HTTP["useragent"] | |
cc1350fa ER |
95 | Index: NEWS |
96 | =================================================================== | |
09cf44bb ER |
97 | --- NEWS (.../tags/lighttpd-1.4.18) (revision 2015) |
98 | +++ NEWS (.../branches/lighttpd-1.4.x) (revision 2015) | |
99 | @@ -3,6 +3,11 @@ | |
cc1350fa ER |
100 | NEWS |
101 | ==== | |
102 | ||
09cf44bb ER |
103 | +- 1.4.19 - |
104 | + | |
105 | + * added support for If-Range: <date> (#1346) | |
106 | + * added support for matching $HTTP["scheme"] in configs | |
cc1350fa | 107 | + |
09cf44bb | 108 | - 1.4.18 - 2007-09-09 |
cc1350fa | 109 | |
09cf44bb | 110 | * fixed compile error on IRIX 6.5.x on prctl() (#1333) |