refactor res.etag= regexp

This commit is contained in:
TJ Holowaychuk 2013-11-13 20:48:57 -08:00
parent 12dda03b83
commit 088fcfd3a6

View file

@ -335,7 +335,7 @@ Response.prototype = {
*/ */
set etag(val) { set etag(val) {
if (!/^(W\/)?".*"$/.test(val)) val = '"' + val + '"'; if (!/^(W\/)?"/.test(val)) val = '"' + val + '"';
this.set('ETag', val); this.set('ETag', val);
}, },