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.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user