refactor res.etag= regexp
This commit is contained in:
parent
12dda03b83
commit
088fcfd3a6
1 changed files with 1 additions and 1 deletions
|
@ -335,7 +335,7 @@ Response.prototype = {
|
|||
*/
|
||||
|
||||
set etag(val) {
|
||||
if (!/^(W\/)?".*"$/.test(val)) val = '"' + val + '"';
|
||||
if (!/^(W\/)?"/.test(val)) val = '"' + val + '"';
|
||||
this.set('ETag', val);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue