[Pkg-javascript-commits] [node-static] 84/151: Merges fix-not-modified-conditions

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Tue Jan 7 23:18:00 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository node-static.

commit 8de8fa96f7ec3975a19b4be993fdde06af1eef82
Merge: ddfe906 f592d8a
Author: Pablo Cantero <pablo at pablocantero.com>
Date:   Sat Oct 13 14:44:44 2012 -0300

    Merges fix-not-modified-conditions

 lib/node-static.js                   |  9 ++++++---
 test/integration/node-static-test.js | 22 ++++++++++++++++++++++
 2 files changed, 28 insertions(+), 3 deletions(-)

diff --cc lib/node-static.js
index 0c80343,db16685..468ed9c
--- a/lib/node-static.js
+++ b/lib/node-static.js
@@@ -184,10 -179,12 +184,12 @@@ exports.Server.prototype.serve = functi
      if (! callback) { return promise }
  };
  
 -this.Server.prototype.respond = function (pathname, status, _headers, files, stat, req, res, finish) {
 -    var mtime           = Date.parse(stat.mtime),
 -        key             = pathname || files[0],
 -        headers         = {},
 +exports.Server.prototype.respond = function (pathname, status, _headers, files, stat, req, res, finish) {
 +    var mtime   = Date.parse(stat.mtime),
 +        key     = pathname || files[0],
-         headers = {};
++        headers = {},
+         clientETag      = req.headers['if-none-match'],
+         clientMTime     = Date.parse(req.headers['if-modified-since']);
  
      // Copy default headers
      for (var k in this.options.headers) {  headers[k] = this.options.headers[k] }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-static.git



More information about the Pkg-javascript-commits mailing list