public HttpHeader is304 (HttpHeader in, Connection con,
Connection.RequestHandler rh) {
CacheEntry entry = rh.entry;
if (entry == null)
return null;
HttpHeader oldresp = rh.dataHook;
/* if we should have gotten anything but a 2xx or a 304,
* we should act like IMS and INM was not there.
*/
/* This should not be needed, it is checked before we enter this method.
HttpHeader expfail = checkExpectations (in, oldresp);
if (expfail != null)
return expfail;
*/
String ifRange = in.getHeader ("If-Range");
if (ifRange != null)
return null;
String sims = in.getHeader ("If-Modified-Since");
String sums = in.getHeader ("If-Unmodified-Since");
List<String> vinm = in.getHeaders ("If-None-Match");
String et = oldresp.getHeader ("Etag");
String range = in.getHeader ("Range");
boolean mustUseStrong = range != null;
boolean etagMatch = false;
Date ims = null;
Date ums = null;
Date dm = null;
if (sims != null)
ims = HttpDateParser.getDate (sims);
if (sums != null)
ums = HttpDateParser.getDate (sums);
if (ims != null || ums != null) {
String lm = oldresp.getHeader ("Last-Modified");
if (lm == null)
return ematch (con, etagMatch, oldresp);
dm = HttpDateParser.getDate (lm);
}