Multiple Set-Cookie headers folded into one header

In the documentation (https://developers.cloudflare.com/workers/runtime-apis/headers/), it says that "the Headers.append method will allow you to set multiple Set-Cookie response headers instead of appending the value onto the existing header."

However, the following code produces a single concatenated Set-Cookie header when sent to the client:

const headers = new Headers();
headers.append('Set-Cookie', 'cookie1=1;');
headers.append('Set-Cookie', 'cookie2=2;');
return new Response(null, headers);

getAll works properly in the Workers environment, but entries shows only a single Set-Cookie header. On the client, only a single header, like so:

Set-Cookie: cookie1=1;, cookie2=2;

This behavior breaks from spec and the docs and prevents me from setting multiple cookies on a single request. Browsers do not properly interpret a single Set-Cookie header.

Is this a bug? Or am I missing something? How can I have multiple Set-Cookie headers on my response?
Was this page helpful?