我经历了HttpServlet类服务方法,我很困惑这个语句在该方法中正在做什么。
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(resp, lastModified);
doGet(req, resp);
} else {
resp.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
}
我们如何计算lastmodified以将其与ifModifiedSince进行比较?