Skip to content
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

Make request headers immutable #36

Closed
grahamlyons opened this issue Aug 25, 2021 · 2 comments
Closed

Make request headers immutable #36

grahamlyons opened this issue Aug 25, 2021 · 2 comments
Labels
behaviour mismatch Different behaviour to Workers runtime fixed-in-next Fixed in next release

Comments

@grahamlyons
Copy link

grahamlyons commented Aug 25, 2021

As mentioned in #32 the request headers in miniflare aren't immutable so I was able to introduce a bug that didn't get picked up until it was deployed.

Would you add a feature request to make these immutable so that my mistakes are picked up earlier?

Thanks so much for miniflare! It's changed my life.

Edit: this was actually on the response headers so perhaps that'll be two feature requests.

@mrbbot
Copy link
Contributor

mrbbot commented Aug 27, 2021

Hey! 👋 Glad you're liking Miniflare! 😊

I'm planning on switching to https://github.com/nodejs/undici for a more spec-compliant fetch implementation in version 2 which should solve this issue. Hang tight! 😄

@mrbbot mrbbot added the behaviour mismatch Different behaviour to Workers runtime label Sep 27, 2021
@mrbbot mrbbot added the fixed-in-next Fixed in next release label Oct 19, 2021
@mrbbot
Copy link
Contributor

mrbbot commented Oct 27, 2021

Hey! 👋 The first pre-release of Miniflare 2 has just been released, which makes incoming Request headers immutable. You can find the full changelog here and install it with npm i miniflare@next -D. Please let me know if you have any other issues, and feel free to ask questions in the #miniflare channel of the Cloudflare Workers Discord server.

@mrbbot mrbbot closed this as completed Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behaviour mismatch Different behaviour to Workers runtime fixed-in-next Fixed in next release
Projects
None yet
Development

No branches or pull requests

2 participants