Skip to content
This repository has been archived by the owner on Jul 15, 2018. It is now read-only.

Commit

Permalink
fix invalid function call
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlamsl committed Jan 2, 2015
1 parent e8512b6 commit 03a36fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/middleware/etag.js
Expand Up @@ -6,7 +6,6 @@
*/

var COMMON_NODE = global.process;
var strings = require('common-utils/strings');
var md5 = require('common-utils/md5').md5;
var Headers = require('../utils/http').Headers;
var ByteString = require('binary').ByteString;
Expand Down Expand Up @@ -69,7 +68,7 @@ exports.middleware = function etag(next, app) {
var etag = '"' + code + '"';
var headers = Headers(res.headers);
headers.set('ETag', etag);
if (strings.contains(request.headers["if-none-match"], etag)) {
if (~(request.headers["if-none-match"] || []).indexOf(etag)) {
// return not-modified response
headers.unset('Content-Length');
return {status:304, headers:headers, body:[]};
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name":"stick",
"version":"0.2.13",
"version":"0.2.14",
"description":"JSGI based webapp framework",
"keywords":["commonjs", "jsgi"],
"author":"Hannes Wallnöfer (http://hns.github.com/) <hannes@helma.at>",
Expand Down

0 comments on commit 03a36fd

Please sign in to comment.