Permalink
Browse files

Changed: res.send() only set ETag when not previously set

  • Loading branch information...
1 parent 18cdb3d commit 1a3e40d818ab045d642d726ec978176c267227ee @tj tj committed May 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/response.js
View
2 lib/response.js
@@ -112,7 +112,7 @@ res.send = function(body){
// ETag support
// TODO: W/ support
if (len > 1024) {
- this.set('ETag', Buffer.isBuffer(body)
+ if (!this.get('ETag')) this.set('ETag', Buffer.isBuffer(body)
? crc.buffer.crc32(body)
: crc.crc32(body));
if (req.fresh) this.statusCode = 304;

0 comments on commit 1a3e40d

Please sign in to comment.