Hopefully fixes avatar caching for CGI installs.

git-svn-id: file:///svn/phpbb/trunk@8281 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof 2007-12-19 17:23:14 +00:00
parent 3ca0a7cb76
commit ab9465a90e
2 changed files with 9 additions and 0 deletions

View file

@ -85,6 +85,7 @@
<ul> <ul>
<li>[Change] Validate birthdays (Bug #15004)</li> <li>[Change] Validate birthdays (Bug #15004)</li>
<li>[Fix] Allow correct avatar caching for CGI installations. (thanks wildbill)</li>
</ul> </ul>
<a name="v30rc8"></a><h3>1.i. Changes since 3.0.RC8</h3> <a name="v30rc8"></a><h3>1.i. Changes since 3.0.RC8</h3>

View file

@ -68,6 +68,14 @@ if (isset($_GET['avatar']))
if ($last_load !== false && $last_load <= $stamp) if ($last_load !== false && $last_load <= $stamp)
{ {
header('Not Modified', true, 304); header('Not Modified', true, 304);
if (@php_sapi_name() == 'CGI')
{
header('Status: 304 Not Modified', true, 304);
}
else
{
header('HTTP/1.0 304 Not Modified', true, 304);
}
// seems that we need those too ... browsers // seems that we need those too ... browsers
header('Pragma: public'); header('Pragma: public');
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000)); header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));