httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r562069 - /httpd/httpd/trunk/modules/proxy/proxy_util.c
Date Thu, 02 Aug 2007 10:17:26 GMT
Author: niq
Date: Thu Aug  2 03:17:25 2007
New Revision: 562069

URL: http://svn.apache.org/viewvc?view=rev&rev=562069
Log:
Improvement suggested by rpluem to proxy_date fix

Modified:
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?view=diff&rev=562069&r1=562068&r2=562069
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Thu Aug  2 03:17:25 2007
@@ -314,25 +314,16 @@
      ap_proxy_date_canon(apr_pool_t *p, const char *date)
 {
     apr_status_t rv;
-    apr_time_exp_t tm;
-    apr_size_t retsize;
     char* ndate;
-    static const char format[] = "%a, %d %b %Y %H:%M:%S GMT";
+
     apr_time_t time = apr_date_parse_http(date);
     if (!time) {
         return date;
     }
 
-    rv = apr_time_exp_gmt(&tm, time);
-
-    if (rv != APR_SUCCESS) {
-        return date;
-    }
-
     ndate = apr_palloc(p, APR_RFC822_DATE_LEN);
-    rv = apr_strftime(ndate, &retsize, APR_RFC822_DATE_LEN, format, &tm);
-
-    if (rv != APR_SUCCESS || !retsize) {
+    rv = apr_rfc822_date(ndate, time);
+    if (rv != APR_SUCCESS) {
         return date;
     }
 



Mime
View raw message