Skip to content

Multiple "set-cookie" headers get merged into one #23662

Closed
@bageren

Description

@bageren
import { default as express } from "npm:express@4.18.2";

const app = express();
const port = 3000;

app.get("/", (req, res) => {
  res.header("set-cookie", ["test1=1; Path=/;", "test2=2; Path=/;"]);
  res.send("Hello World!");
});

When I open localhost:3000, I see set-cookie: test1=1; Path=/;,test2=2; Path=/; in the response headers. This causes only the first one (test1) to be set, while test2 is ignored.

The expected result would be 2 set-cookie headers in the response:

set-cookie: test1=1; Path=/;
set-cookie: test2=2; Path=/;

Doing the exact same thing using Node v18.17.0 produces the expected result.

Version: Deno 1.41.3

Metadata

Metadata

Assignees

Labels

bugSomething isn't working correctlynode compat

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions