http: fix non-string header value concatenation
authorBrian White <mscdex@mscdex.net>
Mon, 28 Dec 2015 23:41:34 +0000 (18:41 -0500)
committerMyles Borins <mborins@us.ibm.com>
Mon, 15 Feb 2016 19:30:23 +0000 (11:30 -0800)
commit1bb2967d48ecfd53cf6dd9d340392e017426ab6b
treed848b24bb2b6506ee74c99ad6fa0ab2648467814
parent437d0e336d62a30baf56292689e98351a79b5044
http: fix non-string header value concatenation

Since headers are stored in an empty literal object ({}) instead
of an object created with Object.create(null), care must be taken
with property names inherited from Object. Currently there are
only functions inherited, so we can safely check for existing
strings instead.

Fixes: https://github.com/nodejs/node/issues/4456
PR-URL: https://github.com/nodejs/node/pull/4460
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
lib/_http_incoming.js
test/parallel/test-http-server-multiheaders.js