1
#! /bin/sh /usr/share/dpatch/dpatch-run
3
## All lines beginning with `## DP:' are a description of the patch.
4
## DP: the actual patch to make suexec-custom read a config file
7
diff -Naur httpd-2.2.11.orig/modules/filters/mod_include.c httpd-2.2.11/modules/filters/mod_include.c
8
--- httpd-2.2.11.orig/modules/filters/mod_include.c 2008-03-17 10:32:47.000000000 -0400
9
+++ httpd-2.2.11/modules/filters/mod_include.c 2009-04-01 11:21:10.000000000 -0400
14
-static void add_include_vars(request_rec *r, const char *timefmt)
15
+static void add_include_vars(request_rec *r)
17
apr_table_t *e = r->subprocess_env;
23
-static const char *add_include_vars_lazy(request_rec *r, const char *var)
24
+static const char *add_include_vars_lazy(request_rec *r, const char *var, const char *timefmt)
27
if (!strcasecmp(var, "DATE_LOCAL")) {
28
include_dir_config *conf =
29
- (include_dir_config *)ap_get_module_config(r->per_dir_config,
31
- val = ap_ht_time(r->pool, r->request_time, conf->default_time_fmt, 0);
32
+ val = ap_ht_time(r->pool, r->request_time, timefmt, 0);
34
else if (!strcasecmp(var, "DATE_GMT")) {
35
- include_dir_config *conf =
36
- (include_dir_config *)ap_get_module_config(r->per_dir_config,
38
- val = ap_ht_time(r->pool, r->request_time, conf->default_time_fmt, 1);
39
+ val = ap_ht_time(r->pool, r->request_time, timefmt, 1);
41
else if (!strcasecmp(var, "LAST_MODIFIED")) {
42
- include_dir_config *conf =
43
- (include_dir_config *)ap_get_module_config(r->per_dir_config,
45
- val = ap_ht_time(r->pool, r->finfo.mtime, conf->default_time_fmt, 0);
46
+ val = ap_ht_time(r->pool, r->finfo.mtime, timefmt, 0);
48
else if (!strcasecmp(var, "USER_NAME")) {
49
if (apr_uid_name_get(&val, r->finfo.user, r->pool) != APR_SUCCESS) {
51
val = apr_table_get(r->subprocess_env, var);
53
if (val == LAZY_VALUE) {
54
- val = add_include_vars_lazy(r, var);
55
+ val = add_include_vars_lazy(r, var, ctx->time_str);
61
val_text = elts[i].val;
62
if (val_text == LAZY_VALUE) {
63
- val_text = add_include_vars_lazy(r, elts[i].key);
64
+ val_text = add_include_vars_lazy(r, elts[i].key, ctx->time_str);
66
val_text = ap_escape_html(ctx->dpool, elts[i].val);
67
v_len = strlen(val_text);
70
ap_add_common_vars(r);
72
- add_include_vars(r, conf->default_time_fmt);
73
+ add_include_vars(r);
75
/* Always unset the content-length. There is no way to know if
76
* the content will be modified at some point by send_parsed_content.