Line
Link Here
|
0 |
-- mod_headers.c.2.2.25 2013-09-25 14:51:42.154723094 -0700 |
0 |
++ mod_headers.c 2013-09-25 14:07:11.806816257 -0700 |
Lines 172-177
Link Here
|
172 |
{ |
172 |
{ |
173 |
return apr_psprintf(r->pool, "t=%" APR_TIME_T_FMT, r->request_time); |
173 |
return apr_psprintf(r->pool, "t=%" APR_TIME_T_FMT, r->request_time); |
174 |
} |
174 |
} |
|
|
175 |
static const char *header_request_utime(request_rec *r, char *seconds) |
176 |
{ |
177 |
apr_time_t base; |
178 |
apr_time_t additional; |
179 |
apr_time_t expires; |
180 |
int additional_sec; |
181 |
char *timestr; |
182 |
|
183 |
base = r->request_time; |
184 |
additional_sec = atoi(seconds); |
185 |
additional = apr_time_from_sec(additional_sec); |
186 |
expires = base + additional; |
187 |
if (expires < r->request_time) { |
188 |
expires = r->request_time; |
189 |
} |
190 |
timestr = apr_palloc(r->pool, APR_RFC822_DATE_LEN); |
191 |
apr_rfc822_date(timestr, expires); |
192 |
return timestr; |
193 |
} |
175 |
|
194 |
|
176 |
/* unwrap_header returns HDR with any newlines converted into |
195 |
/* unwrap_header returns HDR with any newlines converted into |
177 |
* whitespace if necessary. */ |
196 |
* whitespace if necessary. */ |
Lines 854-859
Link Here
|
854 |
register_format_tag_handler("t", (const void *)header_request_time); |
873 |
register_format_tag_handler("t", (const void *)header_request_time); |
855 |
register_format_tag_handler("e", (const void *)header_request_env_var); |
874 |
register_format_tag_handler("e", (const void *)header_request_env_var); |
856 |
register_format_tag_handler("s", (const void *)header_request_ssl_var); |
875 |
register_format_tag_handler("s", (const void *)header_request_ssl_var); |
|
|
876 |
register_format_tag_handler("u", (const void *)header_request_utime); |
857 |
|
877 |
|
858 |
return OK; |
878 |
return OK; |
859 |
} |
879 |
} |