@dkx/http-server
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -24,5 +24,7 @@ "use strict"; | ||
hasHeader(name) { | ||
name = name.toLowerCase(); | ||
return typeof this._headers[name] !== 'undefined'; | ||
} | ||
getHeader(name, defaultValue) { | ||
name = name.toLowerCase(); | ||
return this.hasHeader(name) ? | ||
@@ -34,2 +36,3 @@ this._headers[name] : | ||
const append = {}; | ||
name = name.toLowerCase(); | ||
append[name] = value; | ||
@@ -49,2 +52,3 @@ return this.clone({ | ||
removeHeader(name) { | ||
name = name.toLowerCase(); | ||
if (!this.hasHeader(name)) { | ||
@@ -51,0 +55,0 @@ return this.clone(); |
{ | ||
"name": "@dkx/http-server", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Minimalistic HTTP server", | ||
@@ -5,0 +5,0 @@ "repository": "git@gitlab.com:dkx/http/server.git", |
Sorry, the diff of this file is not supported yet
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
33869
412