Responder.prototype.isNotModified = function()

in src/responder.js [29:43]


Responder.prototype.isNotModified = function(stats) {
  if (stats.etag && stats.etag === this.req.headers["if-none-match"]) {
    return true;
  }

  let reqModified = this.req.headers["if-modified-since"];
  if (reqModified) {
    reqModified = new Date(reqModified).getTime();
  }
  if (stats.modified && reqModified && stats.modified < reqModified) {
    return true;
  }

  return false;
};