Changeset 1478
- Timestamp:
- 12/19/2006 03:11:04 PM (20 months ago)
- Files:
-
- 1 modified
-
branches/lighttpd-1.4.x/src/mod_expire.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/lighttpd-1.4.x/src/mod_expire.c
r1371 r1478 86 86 * parse 87 87 * 88 * '(access| modification) [plus] {<num> <type>}*'88 * '(access|now|modification) [plus] {<num> <type>}*' 89 89 * 90 90 * e.g. 'access 1 years' … … 102 102 type = 0; 103 103 ts += 7; 104 } else if (0 == strncmp(ts, "now ", 4)) { 105 type = 0; 106 ts += 4; 104 107 } else if (0 == strncmp(ts, "modification ", 13)) { 105 108 type = 1; … … 117 120 } 118 121 119 /* the rest is just <number> (years|months| days|hours|minutes|seconds) */122 /* the rest is just <number> (years|months|weeks|days|hours|minutes|seconds) */ 120 123 while (1) { 121 124 char *space, *err; … … 149 152 0 == strncmp(ts, "months", slen)) { 150 153 num *= 60 * 60 * 24 * 30; 154 } else if (slen == 5 && 155 0 == strncmp(ts, "weeks", slen)) { 156 num *= 60 * 60 * 24 * 7; 151 157 } else if (slen == 4 && 152 158 0 == strncmp(ts, "days", slen)) { … … 175 181 } else if (0 == strcmp(ts, "months")) { 176 182 num *= 60 * 60 * 24 * 30; 183 } else if (0 == strcmp(ts, "weeks")) { 184 num *= 60 * 60 * 24 * 7; 177 185 } else if (0 == strcmp(ts, "days")) { 178 186 num *= 60 * 60 * 24;

