feat: #158 support removing headers which were previously set via "setHeader"

This commit is contained in:
Sefa Ilkimen
2020-06-25 10:28:43 +02:00
parent 8a3bc17810
commit 3bec8dde5f
5 changed files with 19 additions and 3 deletions
+3 -1
View File
@@ -187,7 +187,9 @@ module.exports = function init(global, jsUtil, cookieHandler, messages, base64,
}
function checkForInvalidHeaderValue(value) {
if (jsUtil.getTypeOf(value) !== 'String') {
var type = jsUtil.getTypeOf(value);
if (type !== 'String' && type !== 'Null') {
throw new Error(messages.INVALID_HEADER_VALUE);
}