{"id":15826192,"url":"https://github.com/frigus02/test-netlify-plugin-nextjs-cookies","last_synced_at":"2025-04-01T10:27:08.880Z","repository":{"id":153282679,"uuid":"363086728","full_name":"frigus02/test-netlify-plugin-nextjs-cookies","owner":"frigus02","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-30T09:18:42.000Z","size":240,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-06T09:43:46.953Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frigus02.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-30T09:09:46.000Z","updated_at":"2021-04-30T09:19:13.000Z","dependencies_parsed_at":"2023-05-02T18:02:43.151Z","dependency_job_id":null,"html_url":"https://github.com/frigus02/test-netlify-plugin-nextjs-cookies","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frigus02%2Ftest-netlify-plugin-nextjs-cookies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frigus02%2Ftest-netlify-plugin-nextjs-cookies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frigus02%2Ftest-netlify-plugin-nextjs-cookies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frigus02%2Ftest-netlify-plugin-nextjs-cookies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frigus02","download_url":"https://codeload.github.com/frigus02/test-netlify-plugin-nextjs-cookies/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246622453,"owners_count":20807148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-05T09:43:41.655Z","updated_at":"2025-04-01T10:27:08.854Z","avatar_url":"https://github.com/frigus02.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# test-netlify-plugin-nextjs-cookies\n\nIt looks like multiple cookies are not correctly serialized when the browser sends multiple cookie headers over HTTP/2.\n\n## Steps to reproduce\n\n1. Test locally\n\n   ```\n   yarn\n   yarn dev\n   ```\n\n   Open http://localhost:3000/ and click on the button to generate 2 cookies. The site should reload and show `\"first=1; second=2\"`. Those are serialized correctly. You can see in the browser devtools that it uses HTTP/1.1.\n\n2. Test on Netlify\n\n   ```\n   export NETLIFY_SITE_ID=your_site_id\n   yarn\n   yarn deploy\n   ```\n\n   Open deployed site and click on the button to generate 2 cookies. The site should reload and show `\"first=1,second=2\"`. Those are _not_ serialized correctly. They are separated by a comma instead of semicolon. You should see in the browser devtools that it uses HTTP/2.\n\n## Investigation\n\nWe investigated further and saw in Wireshark, that browsers send multiple cookie headers when using HTTP/2:\n\n```\ncookie: first=1\ncookie: second=2\n```\n\nbut only 1 header with using HTTP/1.1:\n\n```\ncookie: first=1; second=2\n```\n\nThis distinction is _not_ visible in browser devtools, sadly. But it seems to be according to the spec.\n\nWe think the code that serializes with a comma instead of semicolon is this line:\n\nhttps://github.com/netlify/netlify-plugin-nextjs/blob/46526f955240dfcd1f65c4ecfa0c563ce2b1362d/src/lib/templates/createRequestObject.js#L64\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrigus02%2Ftest-netlify-plugin-nextjs-cookies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrigus02%2Ftest-netlify-plugin-nextjs-cookies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrigus02%2Ftest-netlify-plugin-nextjs-cookies/lists"}