summaryrefslogtreecommitdiffhomepage
path: root/src/nodejs/unit-http/http_server.js
diff options
context:
space:
mode:
authorAlexander Borisov <alexander.borisov@nginx.com>2018-11-15 15:21:52 +0300
committerAlexander Borisov <alexander.borisov@nginx.com>2018-11-15 15:21:52 +0300
commitfb18a09cd748ff0107d4e27e514c9f5caf3aa5e6 (patch)
treedd8738c57c3df3a083500b0e0dee20a334656dfd /src/nodejs/unit-http/http_server.js
parent06b404feb17dec9e3a84da31e213f21a0a9b4846 (diff)
downloadunit-fb18a09cd748ff0107d4e27e514c9f5caf3aa5e6.tar.gz
unit-fb18a09cd748ff0107d4e27e514c9f5caf3aa5e6.tar.bz2
Node.js: fixed handling of response header fields.
This fixes two issues: - values for mutiple header fields with the same name passed as arrays were converted to string; - the type of field value wasn't preserved as required by specification.
Diffstat (limited to '')
-rwxr-xr-xsrc/nodejs/unit-http/http_server.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nodejs/unit-http/http_server.js b/src/nodejs/unit-http/http_server.js
index b35ad259..331778a3 100755
--- a/src/nodejs/unit-http/http_server.js
+++ b/src/nodejs/unit-http/http_server.js
@@ -78,7 +78,7 @@ ServerResponse.prototype.setHeader = function setHeader(key, value) {
this.removeHeader(key);
- this.headers[key] = value + "";
+ this.headers[key] = value;
this.headers_len += header_len + (header_key_len * header_count);
this.headers_count += header_count;
};