Comparing version 1.5.1 to 1.6.0
1.6.0 / 2018-02-12 | ||
================== | ||
* feat: ignore set/remove header/status when header sent (#1145) | ||
1.5.1 / 2018-01-25 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -82,2 +82,4 @@ | ||
set status(code) { | ||
if (this.headerSent) return; | ||
assert('number' == typeof code, 'status code must be a number'); | ||
@@ -233,2 +235,4 @@ assert(statuses[code], 'invalid status code: ' + code); | ||
vary: function(field){ | ||
if (this.headerSent) return; | ||
vary(this.res, field); | ||
@@ -435,2 +439,4 @@ }, | ||
set: function(field, val){ | ||
if (this.headerSent) return; | ||
if (2 == arguments.length) { | ||
@@ -481,2 +487,4 @@ if (Array.isArray(val)) val = val.map(String); | ||
remove: function(field){ | ||
if (this.headerSent) return; | ||
this.res.removeHeader(field); | ||
@@ -483,0 +491,0 @@ }, |
{ | ||
"name": "koa", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"description": "Koa web app framework", | ||
@@ -5,0 +5,0 @@ "main": "lib/application.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58267
1370