]>
Commit | Line | Data |
---|---|---|
9d525b52 ER |
1 | --- lighttpd-1.4.13/src/mod_expire.c 2006-12-19 14:39:05.036374620 +0200 |
2 | +++ lighttpd-1.4.13/src/mod_expire.c 2006-12-19 14:56:31.510009332 +0200 | |
3 | @@ -85,7 +85,7 @@ | |
4 | /* | |
5 | * parse | |
6 | * | |
7 | - * '(access|modification) [plus] {<num> <type>}*' | |
8 | + * '(access|now|modification) [plus] {<num> <type>}*' | |
9 | * | |
10 | * e.g. 'access 1 years' | |
11 | */ | |
12 | @@ -101,6 +101,9 @@ | |
13 | if (0 == strncmp(ts, "access ", 7)) { | |
14 | type = 0; | |
15 | ts += 7; | |
16 | + } else if (0 == strncmp(ts, "now ", 4)) { | |
17 | + type = 0; | |
18 | + ts += 4; | |
19 | } else if (0 == strncmp(ts, "modification ", 13)) { | |
20 | type = 1; | |
21 | ts += 13; | |
22 | @@ -119,7 +122,7 @@ | |
23 | ts += 5; | |
24 | } | |
25 | ||
26 | - /* the rest is just <number> (years|months|days|hours|minutes|seconds) */ | |
27 | + /* the rest is just <number> (years|months|weeks|days|hours|minutes|seconds) */ | |
28 | while (1) { | |
29 | char *space, *err; | |
30 | int num; | |
31 | @@ -151,6 +154,9 @@ | |
32 | } else if (slen == 6 && | |
33 | 0 == strncmp(ts, "months", slen)) { | |
34 | num *= 60 * 60 * 24 * 30; | |
35 | + } else if (slen == 5 && | |
36 | + 0 == strncmp(ts, "weeks", slen)) { | |
37 | + num *= 60 * 60 * 24 * 7; | |
38 | } else if (slen == 4 && | |
39 | 0 == strncmp(ts, "days", slen)) { | |
40 | num *= 60 * 60 * 24; | |
41 | @@ -177,6 +183,8 @@ | |
42 | num *= 60 * 60 * 24 * 30 * 12; | |
43 | } else if (0 == strcmp(ts, "months")) { | |
44 | num *= 60 * 60 * 24 * 30; | |
45 | + } else if (0 == strcmp(ts, "weeks")) { | |
46 | + num *= 60 * 60 * 24 * 7; | |
47 | } else if (0 == strcmp(ts, "days")) { | |
48 | num *= 60 * 60 * 24; | |
49 | } else if (0 == strcmp(ts, "hours")) { |