🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.php
Article #219761

Re: HTTP_IF_MODIFIED_SINCE, HTTP_IF_NONE_MATCH

#219761
From: Peter
Date: Sun, 19 Jul 2009 10:17
24 lines
1684 bytes
Lemat pisze:
> ja bym strzelił, że porównanie:
> strtotime(trim($_SERVER['HTTP_IF_MODIFIED_SINCE'])) == filemtime($path))
> 
> nie działa i zrobił tak:
> trim($_SERVER['HTTP_IF_MODIFIED_SINCE']) == gmdate('D, d M Y 
> H:i:s',filemtime($path))). ' GMT'
> 
> dokładniej to strtotime zwraca "nieprawidłowy" wynik:
> "This function will use the TZ environment variable (if available) to 
> calculate the timestamp".

Trochę Firebug z Firefoksa mnie zmylił. Generalnie nie ustawienia 
Cache-control były problemem, ale to, że usuwałem nagłówek Last-modified:

# Remove Last-Modified header
<ifModule mod_headers.c>
	Header unset Last-Modified
</ifModule>

Co ciekawe, na home.pl ma to wpływ, ale na nazwa.pl już nie.

-- 
Peter
Technical Details
Message-ID: <h3uhpp$ija$1@node1.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!news.nask.pl!news.nask.org.pl!newsfeed.atman.pl!not-for-mail
References: <h3s4n0$bd4$1@node2.news.atman.pl> <h3s85v$jir$1@atlantis.news.neostrada.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!news.nask.pl!news.nask.org.pl!newsfeed.atman.pl!not-for-mail
From: Peter <peter.may@poczta.fm>
Newsgroups: pl.comp.lang.php
Subject: Re: HTTP_IF_MODIFIED_SINCE, HTTP_IF_NONE_MATCH
Date: Sun, 19 Jul 2009 12:17:41 +0200
Organization: ATMAN
Lines: 24
Message-ID: <h3uhpp$ija$1@node1.news.atman.pl>
References: <h3s4n0$bd4$1@node2.news.atman.pl> <h3s85v$jir$1@atlantis.news.neostrada.pl>
NNTP-Posting-Host: inet20909na-2.nat.umts.dynamic.eranet.pl
Mime-Version: 1.0
X-Trace: node1.news.atman.pl 1247988346 19050 213.158.196.66 (19 Jul 2009 07:25:46 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Sun, 19 Jul 2009 07:25:46 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
In-Reply-To: <h3s85v$jir$1@atlantis.news.neostrada.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit