r4238 bugfix: image caching was broken with some browsers
authorAlexey Andriyanov <alan@al-an.info>
Fri, 18 Feb 2011 16:52:46 +0000 (16:52 +0000)
committerAlexey Andriyanov <alan@al-an.info>
Fri, 18 Feb 2011 16:52:46 +0000 (16:52 +0000)
Firefox 3.6.13 is sending IMS header with '+0000' timezone instead of expected 'GMT'

HTTPDateToUnixTime: fixed timezone regexp to handle +0000 format

ChangeLog
wwwroot/render_image.php

index 761110c59f661207259fceb8ce63d754bfe216de..0889290523c62f0bfcb6f5f8e2a2e8f37c8815cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,8 @@
        bugfix: change Config.varvalue column type to accommodate contents > 255 characters (#397)
        bugfix: delete container relationships when an object is deleted (#398)
        bugfix: SQL syntax error in some versions of MySQL+PDO
+       bugfix: image caching was broken with some browsers
+>>>>>>> .r4237
 0.19.0 2011-02-12
        new feature: IPv6 support, except of LivePTR, NAT and SLB functionality (by Alexey Andriyanov)
        new feature: cable ID column for links (#328, by Giovani Zamboni and Jens Weibler)
index f12a56762db622f3e24e43bf9ff663f7ed3757d6..c1ab288646ee57af4202baeb794ff690c8046fd6 100644 (file)
@@ -87,8 +87,8 @@ function HTTPDateToUnixTime ($string)
        );
 
        $formats = array();
-       $formats['rfc1123'] = '/^(Sun|Mon|Tue|Wed|Thu|Fri|Sat), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{2}):(\d{2}):(\d{2}) GMT$/';
-       $formats['rfc850'] = '/^(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{2}):(\d{2}):(\d{2}) GMT$/';
+       $formats['rfc1123'] = '/^(Sun|Mon|Tue|Wed|Thu|Fri|Sat), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{2}):(\d{2}):(\d{2}) (?:GMT|[-+]0000)$/';
+       $formats['rfc850'] = '/^(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{2}):(\d{2}):(\d{2}) (?:GMT|[-+]0000)$/';
        $formats['asctime'] = '/^(Sun|Mon|Tue|Wed|Thu|Fri|Sat) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{2}|\d{1}) (\d{2}):(\d{2}):(\d{2}) (\d{4})$/';
 
        $matches = array();