Verify canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.4.0: Fri Feb 10 08:08:36 PST 2023; root:xnu-8796.100.721.505.3~4/RELEASE_ARM64_T6000
Binaries:
Node: 19.6.0
npm: 9.4.0
Yarn: 3.3.1
pnpm: N/A
Relevant packages:
next: 13.2.2-canary.3
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
Middleware / Edge (API routes, runtime)
Link to the code that reproduces this issue
https://codesandbox.io/p/sandbox/mystifying-babbage-ruhtyx?file=%2Fpages%2Fapi%2Ftest.ts
To Reproduce
Visit /api/test with devtools open to observe the cookies sent with the request.
Describe the Bug
Only a single Set-Cookie header is sent and only a single cookie is set:

Expected Behavior
Two Set-Cookie headers should be added, as the fetch standard specifies.
This issue is very similar to #38302; @balazsorban44 asked that I open this issue to track this separate reproduction!
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
NEXT-735
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
Middleware / Edge (API routes, runtime)
Link to the code that reproduces this issue
https://codesandbox.io/p/sandbox/mystifying-babbage-ruhtyx?file=%2Fpages%2Fapi%2Ftest.ts
To Reproduce
Visit
/api/testwith devtools open to observe the cookies sent with the request.Describe the Bug
Only a single Set-Cookie header is sent and only a single cookie is set:

Expected Behavior
Two Set-Cookie headers should be added, as the fetch standard specifies.
This issue is very similar to #38302; @balazsorban44 asked that I open this issue to track this separate reproduction!
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
NEXT-735