From b0796df50f23cae502b76fa527f1c42591c1f51b Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Thu, 19 Apr 2001 21:18:41 +0000 Subject: [PATCH] Made sure dates were canonicalised correctly when passed to the client 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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index 0d28b3c1ce..17cb09cd95 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -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; -- 2.50.1