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
Handle multiple headers with the same name #21
Comments
Data structureI suggest to store the multiple headers in a list of tuples: // mockServiceWorker.js
// This would need to be constructed dynamically from "req.headers"
const headers = [['name', 'value'], ['name', 'value']] Current implementation mirrors the De-serializationWhen accepted from the MSW on the client side in |
I was going through the open issues and this is one of the most needed things at the moment. I was wondering if you have the time/desire to implement this, @hehehai? Feel free to say no, I'd try to do this some time next week in that case. |
@kettanaito this was the issue that I discussed with you, it’s my bad I literally forgot to implement the changes. If anyone is not taking in 2-3 days, it’s mine 😅 |
@kettanaito I'm sorry, I don't have any ideas at the moment😐 |
https://github.com/kettanaito/msw/blob/fb1e53cf9cb719ea03c7a3f964461cfb84aa54e2/mockServiceWorker.js#L59-L65
Need to ensure multiple headers with the same name can be handled by MockServiceWorker.
This may also mean to adjust the current algorithm for handling headers between client/sw.
Surface
headers
in MSW andinterceptRequest
context.set()
to support setting of multiple headers with the same nameThe text was updated successfully, but these errors were encountered: