Version
v20.8.0
Platform
Darwin A-KM20V94RKQ 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64
Subsystem
http
What steps will reproduce the bug?
consthttp=require('http');constserver=http.createServer((req,res)=>{if(req.url==='/api/works'){constsomeString='Hello world!';constbuffer=Buffer.from(someString,'utf8');res.setHeader('Content-Disposition','attachment; filename="hello.txt"');res.end(buffer);}elseif(req.url==='/api/fails'){constsomeString='Hello world!';constbuffer=Buffer.from(someString,'utf8');res.setHeader('Content-Disposition',['attachment; filename="hello.txt"']);// returns ERR_INVALID_HTTP_RESPONSE in Chrome, fails with a 502 on ALBres.end(buffer);}});constport=3000;server.listen(port,()=>{console.log(`Server is running on port ${port}`);});How often does it reproduce? Is there a required condition?
It is always reproducible.
What is the expected behavior? Why is that the expected behavior?
Expected behavior is that an array can be passed as a value for the content-disposition header just like any other header.
What do you see instead?
Passing an array as a value to content-disposition header results in invalid header value.
Additional information
Issue introduced by #46528
Version
v20.8.0
Platform
Darwin A-KM20V94RKQ 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64
Subsystem
http
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
It is always reproducible.
What is the expected behavior? Why is that the expected behavior?
Expected behavior is that an array can be passed as a value for the content-disposition header just like any other header.
What do you see instead?
Passing an array as a value to content-disposition header results in invalid header value.
Additional information
Issue introduced by #46528