From ef97fce22d88a5ee1ee9e66f1d91b1a1d0ebbdcf Mon Sep 17 00:00:00 2001
From: Martin Nilsson <nilsson@opera.com>
Date: Sun, 26 May 2013 01:47:48 +0200
Subject: [PATCH] Use Calendar http_time for http_decode.date.

---
 lib/modules/Protocols.pmod/HTTP.pmod/Server.pmod/module.pmod | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/modules/Protocols.pmod/HTTP.pmod/Server.pmod/module.pmod b/lib/modules/Protocols.pmod/HTTP.pmod/Server.pmod/module.pmod
index 4f11e33461..736ac6a76a 100644
--- a/lib/modules/Protocols.pmod/HTTP.pmod/Server.pmod/module.pmod
+++ b/lib/modules/Protocols.pmod/HTTP.pmod/Server.pmod/module.pmod
@@ -62,8 +62,8 @@ string http_date(int time)
 //!	zero (UNDEFINED) if the given string isn't a HTTP date
 int http_decode_date(string data)
 {
-   Calendar.ISO_UTC.Second s=
-      Calendar.ISO_UTC.parse("%e, %D %M %Y %h:%m:%s GMT",data);
+
+   Calendar.ISO_UTC.Second s=Calendar.ISO_UTC.http_time(data);
    if (!s) return UNDEFINED;
    return s->unix_time();
 }
-- 
GitLab