Skip to content

Commit

Permalink
correct ETag header syntax
Browse files Browse the repository at this point in the history
According to section 3.11 of RFC 2616, the ETag header should be
quoted-string which, according to 2.2 in the same document is a string
enclosed in "
  • Loading branch information
pilif committed Apr 24, 2010
1 parent d71ab6d commit 59345d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/paperboy.js
Expand Up @@ -27,7 +27,7 @@ exports.streamFile = function (filepath, headerFields, stat, res, req, emitter)
contentType += '; charset=' + charset;
headerFields['Content-Type'] = contentType;

etag = stat.ino + '-' + stat.size + '-' + Date.parse(stat.mtime);
etag = '"' + stat.ino + '-' + stat.size + '-' + Date.parse(stat.mtime) +'"';
headerFields['ETag'] = etag;

var statCode;
Expand Down

0 comments on commit 59345d1

Please sign in to comment.