diff options
author | Alexander Borisov <alexander.borisov@nginx.com> | 2018-12-19 15:57:07 +0300 |
---|---|---|
committer | Alexander Borisov <alexander.borisov@nginx.com> | 2018-12-19 15:57:07 +0300 |
commit | 98e8f366dabbe1b8e923678d9edd17ee61b54e0f (patch) | |
tree | 3e9700979b4f9e9516851d167854b37d70634950 /src/nodejs | |
parent | d9dad07934c17319b6aecd5b4958cdef3a196ad0 (diff) | |
download | unit-98e8f366dabbe1b8e923678d9edd17ee61b54e0f.tar.gz unit-98e8f366dabbe1b8e923678d9edd17ee61b54e0f.tar.bz2 |
Node.js: removed value checking for headers.
Diffstat (limited to '')
-rwxr-xr-x | src/nodejs/unit-http/http_server.js | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/nodejs/unit-http/http_server.js b/src/nodejs/unit-http/http_server.js index 061c39aa..057a1f26 100755 --- a/src/nodejs/unit-http/http_server.js +++ b/src/nodejs/unit-http/http_server.js @@ -59,18 +59,10 @@ ServerResponse.prototype.setHeader = function setHeader(name, value) { count = value.length; value.forEach(function(val) { - if (typeof val !== 'string' && typeof val !== 'number') { - throw new TypeError('Array entries must be string or number'); - } - value_len += Buffer.byteLength(val + "", 'latin1'); }); } else { - if (typeof value !== 'string' && typeof value !== 'number') { - throw new TypeError('Value argument must be string, number, or array'); - } - count = 1; value_len = Buffer.byteLength(value + "", 'latin1'); } |