~ubuntu-branches/ubuntu/jaunty/apache2/jaunty-updates

« back to all changes in this revision

Viewing changes to debian/patches/203_fix-ssi-timeftm-ignored.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-04-01 11:39:17 UTC
  • Revision ID: james.westby@ubuntu.com-20090401113917-bu107jyfu774vhbn
Tags: 2.2.11-2ubuntu2
debian/patches/203_fix-ssi-timeftm-ignored.dpatch: 
Fix timefmt is ignored when XBitHack is on. (LP: #258914) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
##
 
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
 
5
 
 
6
@DPATCH@
 
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
 
10
@@ -580,7 +580,7 @@
 
11
     *p = '\0';
 
12
 }
 
13
 
 
14
-static void add_include_vars(request_rec *r, const char *timefmt)
 
15
+static void add_include_vars(request_rec *r)
 
16
 {
 
17
     apr_table_t *e = r->subprocess_env;
 
18
     char *t;
 
19
@@ -608,26 +608,18 @@
 
20
     }
 
21
 }
 
22
 
 
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)
 
25
 {
 
26
     char *val;
 
27
     if (!strcasecmp(var, "DATE_LOCAL")) {
 
28
         include_dir_config *conf =
 
29
-            (include_dir_config *)ap_get_module_config(r->per_dir_config,
 
30
-                                                       &include_module);
 
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);
 
33
     }
 
34
     else if (!strcasecmp(var, "DATE_GMT")) {
 
35
-        include_dir_config *conf =
 
36
-            (include_dir_config *)ap_get_module_config(r->per_dir_config,
 
37
-                                                       &include_module);
 
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);
 
40
     }
 
41
     else if (!strcasecmp(var, "LAST_MODIFIED")) {
 
42
-        include_dir_config *conf =
 
43
-            (include_dir_config *)ap_get_module_config(r->per_dir_config,
 
44
-                                                       &include_module);
 
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);
 
47
     }
 
48
     else if (!strcasecmp(var, "USER_NAME")) {
 
49
         if (apr_uid_name_get(&val, r->finfo.user, r->pool) != APR_SUCCESS) {
 
50
@@ -684,7 +676,7 @@
 
51
         val = apr_table_get(r->subprocess_env, var);
 
52
 
 
53
         if (val == LAZY_VALUE) {
 
54
-            val = add_include_vars_lazy(r, var);
 
55
+            val = add_include_vars_lazy(r, var, ctx->time_str);
 
56
         }
 
57
     }
 
58
 
 
59
@@ -2423,7 +2415,7 @@
 
60
         /* get value */
 
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);
 
65
         }
 
66
         val_text = ap_escape_html(ctx->dpool, elts[i].val);
 
67
         v_len = strlen(val_text);
 
68
@@ -3608,7 +3600,7 @@
 
69
          * environment */
 
70
         ap_add_common_vars(r);
 
71
         ap_add_cgi_vars(r);
 
72
-        add_include_vars(r, conf->default_time_fmt);
 
73
+        add_include_vars(r);
 
74
     }
 
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.