We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If Request is passed as the first parameter and no header is passed, the set-cookie header is not cloned.
const request = new Request("https://example.com", { headers: { "set-cookie": "A" } }); const req = new Request(request); req.headers.append("set-cookie", "B"); console.log(request.headers.getSetCookie()); // [ 'A', 'B' ] console.log(req.headers.getSetCookie()); // [ 'A', 'B' ] console.log(request.headers.get("set-cookie")); // 'A' console.log(req.headers.get("set-cookie")); // 'A, B'
const request = new Request("https://example.com", { headers: { "set-cookie": "A" } }); const req = new Request(reqeust); req.headers.append("set-cookie", "B"); console.log(request.headers.getSetCookie()); // [ 'A' ] console.log(req.headers.getSetCookie()); // [ 'A', 'B' ] console.log(request.headers.get("set-cookie")); // 'A' console.log(req.headers.get("set-cookie")); // 'A, B'
> $ node Welcome to Node.js v21.1.0. Type ".help" for more information. > const request = new Request("https://example.com", { headers: { "set-cookie": "A" } }); undefined > const req = new Request(request); undefined > req.headers.append("set-cookie", "B"); undefined > console.log(request.headers.getSetCookie()); [ 'A', 'B' ] undefined > console.log(req.headers.getSetCookie()); [ 'A', 'B' ] undefined > console.log(request.headers.get("set-cookie")) A undefined > console.log(req.headers.get("set-cookie")) A, B undefined
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Bug Description
If Request is passed as the first parameter and no header is passed, the set-cookie header is not cloned.
Reproducible By
Expected Behavior
Logs & Screenshots
Environment
Additional context
The text was updated successfully, but these errors were encountered: