Thats not the only thing though .. there's also the case that the
remote server didn't set a Last-Modified header, so the check for
ifModified and ifNoneMatch still fails, since there's no last-modified
to check against.
Maybe that's ok .. but i'm trying to find out if we can't handle that
better our selves, would be a shame to loose being able to cache
efficiently because someone didn't configure their server correctly
-- Chris
On Jul 2, 2008, at 7:22 PM, Emilio Daniel González wrote:
jaja! sorry, i forgot modify the function in the last code from svn.
Can you fix that?, here you got the "real" function:
private function setCachingHeaders($etag = null)
{
// TODO: Re-implement caching behavior if appropriate.
header("Cache-Control: private; max-age=0", true);
header("Expires: " . gmdate("D, d M Y H:i:s", time() - 3000) . "
GMT", true);
if ($etag !== null)
header("ETag: $etag", true);
}
cheers!
On Wed, Jul 2, 2008 at 2:15 PM, Chris Chabot (JIRA)
<[EMAIL PROTECTED]> wrote:
[ https://issues.apache.org/jira/browse/SHINDIG-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609978
#action_12609978 ]
Chris Chabot commented on SHINDIG-374:
--------------------------------------
Hi Emilio,
I noticed something funny about this patch:
$this->setCachingHeaders($etag);
..
private function setCachingHeaders()
{
// TODO: Re-implement caching behavior if appropriate.
header("Cache-Control: private; max-age=0", true);
header("Expires: " . gmdate("D, d M Y H:i:s", time() - 3000) . "
GMT", true);
}
In other words the e-tag is never set, so the code never could have
been tested .... And really i much prefer to see patches that you
at least tried out in a few different browsers, and actually ran
your self :)
I'm taking a look at the code now but it seems i'll have to modify
it a good bit to cover all the border cases.
Proxy ignores e-tags / if-modified-since
----------------------------------------
Key: SHINDIG-374
URL: https://issues.apache.org/jira/browse/
SHINDIG-374
Project: Shindig
Issue Type: Bug
Components: Gadget Rendering Server (PHP)
Reporter: Chris Chabot
Attachments: shindig-http-304-support.patch
The ProxyHandler class does it's own header control instead of
using the generic Servlet one because it requires full control
over what headers are send.
However this currently means it doesn't honor if-modified-since
and e-tag headers, which causes the proxied files to always be re-
downloaded by the web browser.
On straight get's it should really:
- If if-modified-since is set, and the cached file time is within
the refreshInterval params value, return not-modified
- Create it's own e-tag's (md5(responseBody)), and if the e-tag's
match return a not-modified
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.