-
-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
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
Setting header with cookie value no longer overwrites a cookie value, it appends #631
Comments
Root causeThe issue is caused by the interceptors pushing recorded headers into the internal array:
So, whenever you set a header on a response with that header name already present, the internal array will contain two values. The response.headers.set('foo', 'bar')
// internally: [ ['foo', 'bar'] ]
response.headers.get('foo', 'xyz')
// internally: [ ['foo', 'bar'], ['foo', 'xyz'] ] |
Released: v0.35.6 🎉This has been released in v0.35.6! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
Awesome work, I can confirm the fix is working on my end 🙌 |
Yoo-hoo! |
Hey there, I've updated
msw
from^2.4.2
to^2.4.5
and thus@mswjs/interceptors
from0.29.1
to0.35.1
. This seems to have a changed behaviour when setting a cookie header.I'm not too sure of the technical details, but this is the change I'm seeing.
Workaround
The text was updated successfully, but these errors were encountered: