* This function sets the Last-Modified output header field to the value * of the mtime field in the request structure - rationalized to keep it from * being in the future. */
| 2278 | * being in the future. |
| 2279 | */ |
| 2280 | AP_DECLARE(void) ap_set_last_modified(request_rec *r) |
| 2281 | { |
| 2282 | if (!r->assbackwards) { |
| 2283 | apr_time_t mod_time = ap_rationalize_mtime(r, r->mtime); |
| 2284 | char *datestr = apr_palloc(r->pool, APR_RFC822_DATE_LEN); |
| 2285 | |
| 2286 | apr_rfc822_date(datestr, mod_time); |
| 2287 | apr_table_setn(r->headers_out, "Last-Modified", datestr); |
| 2288 | } |
| 2289 | } |
| 2290 | |
| 2291 | typedef struct hdr_ptr { |
| 2292 | ap_filter_t *f; |