]> granicus.if.org Git - apache/commitdiff
Made sure dates were canonicalised correctly when passed to the client
authorGraham Leggett <minfrin@apache.org>
Thu, 19 Apr 2001 21:18:41 +0000 (21:18 +0000)
committerGraham Leggett <minfrin@apache.org>
Thu, 19 Apr 2001 21:18:41 +0000 (21:18 +0000)
browser through the HTTP proxy.
PR:
Obtained from:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88898 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_http.c

index 0d28b3c1ce0a10814b41150daed643c5d7c1a8ad..17cb09cd9513255bb031bc124bb800c3afa499e4 100644 (file)
@@ -705,6 +705,20 @@ PROXY_DECLARE (int) ap_proxy_http_handler(request_rec *r, proxy_server_conf *con
        close += 1;
     }
 
+    /* we must accept 3 kinds of date, but generate only 1 kind of date */
+    {
+       const char *buf;
+        if ((buf = apr_table_get(r->headers_out, "Date")) != NULL) {
+           apr_table_set(r->headers_out, "Date", ap_proxy_date_canon(p, buf));
+       }
+        if ((buf = apr_table_get(r->headers_out, "Expires")) != NULL) {
+           apr_table_set(r->headers_out, "Expires", ap_proxy_date_canon(p, buf));
+       }
+        if ((buf = apr_table_get(r->headers_out, "Last-Modified")) != NULL) {
+           apr_table_set(r->headers_out, "Last-Modified", ap_proxy_date_canon(p, buf));
+       }
+    }
+
     /* munge the Location and URI response headers according to ProxyPassReverse */
     {
        const char *buf;