--- mod_headers.c.2.2.25 2013-09-25 14:51:42.154723094 -0700 +++ mod_headers.c 2013-09-25 14:07:11.806816257 -0700 @@ -172,6 +172,25 @@ { return apr_psprintf(r->pool, "t=%" APR_TIME_T_FMT, r->request_time); } +static const char *header_request_utime(request_rec *r, char *seconds) +{ + apr_time_t base; + apr_time_t additional; + apr_time_t expires; + int additional_sec; + char *timestr; + + base = r->request_time; + additional_sec = atoi(seconds); + additional = apr_time_from_sec(additional_sec); + expires = base + additional; + if (expires < r->request_time) { + expires = r->request_time; + } + timestr = apr_palloc(r->pool, APR_RFC822_DATE_LEN); + apr_rfc822_date(timestr, expires); + return timestr; +} /* unwrap_header returns HDR with any newlines converted into * whitespace if necessary. */ @@ -854,6 +873,7 @@ register_format_tag_handler("t", (const void *)header_request_time); register_format_tag_handler("e", (const void *)header_request_env_var); register_format_tag_handler("s", (const void *)header_request_ssl_var); + register_format_tag_handler("u", (const void *)header_request_utime); return OK; }