You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
parseHeaders fails with multiple set-cookie headers in FirefoxΒ #928
I'm developing a plugin for Zotero, which runs on Firefox's runtime environment.
At some point, an XMLHttpRequest is sent, which returns a response with multiple "set-cookie" headers. For some reason, these headers are concatenated (by getAllResponseHeaders() and getResponseHeader()) with \n instead of with \n\t or , . As a result, parseHeadersfails with Invalid character in header field name.
I tried running some test requests on a recent Firefox browser (v85.0). I used Firefox's Browser Toolbox to debug the browser's main process, because otherwise getAllResponseHeaders and getResponseHeader would ignoreset-cookie headers. I set up an Apache web server to send duplicate set-cookie and MyHeader headers. In Apache config file:
I don't know enough about the HTTP protocol to understand if this is a bug in Firefox, or if it is an accepted behavior and should be handled by github/fetch.
Activity
Resolves #928
Resolves #928
BoussonKarel commentedon Jul 19, 2023
This suddenly introduces a new issue in our code:


Set-Cookie is a forbidden response-header name:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
https://fetch.spec.whatwg.org/#forbidden-response-header-name
Revert "Resolves #928"
Revert "Resolves #928"
Update dependency whatwg-fetch to v3.6.19 (#216)
Update dependency whatwg-fetch to v3.6.19 (#268)
Resolves JakeChampion/fetch#928
Revert "Resolves JakeChampion/fetch#928"