[
https://issues.apache.org/jira/browse/WICKET-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Igor Vaynberg reassigned WICKET-2996:
-------------------------------------
Assignee: Igor Vaynberg
> if-modified-since checking is not working in AbstractResource
> -------------------------------------------------------------
>
> Key: WICKET-2996
> URL: https://issues.apache.org/jira/browse/WICKET-2996
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M1
> Reporter: Peter Ertl
> Assignee: Igor Vaynberg
> Attachments: fix-if-modified-since.patch
>
>
> In AbstractResource the if-modified-since header is not working correctly
> the servlet container seems not to deliver if-modified-since in milliseond
> precision
> so a if-modified-since timestamp like 1281787899123 will be cut off to
> 1281787899000.
> there was already a counter-measure in wicket-1.4 which seems to be missing
> in 1.5.
> wicket-1.4:
> WicketFilter, v 1.4.10, line 330ff:
> if (ifModifiedSince < (lastModified / 1000 *
> 1000))
> {
> // If the servlet mod time is
> later, call doGet()
> // Round down to the nearest
> second for a proper compare
> // A ifModifiedSince of -1 will
> always be less
>
> maybeSetLastModified(httpServletResponse, lastModified);
> doGet(httpServletRequest,
> httpServletResponse);
> }
>
> This kind of rounding ( / 1000 * 1000) is missing in 1.5 so the
> if-modified-since check eventually fails.
> Patch is included.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.