long last_modified = resource.getLastModified();
if (last_modified > 0) {
String if_modified_since = request.getHeader("if-modified-since");
if (if_modified_since != null) {
HttpDate ifmod = new HttpDate();
if (ifmod.parse(if_modified_since)) {
HttpDate mod = new HttpDate(last_modified);
if (mod.after(ifmod)) {
response.setStatus(304);
response.setContentLength(0);
return;
}
}