-
Notifications
You must be signed in to change notification settings - Fork 716
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
[miniflare] feature: respect incoming Accept-Encoding
header
#5409
Conversation
🦋 Changeset detectedLatest commit: 18ac0fa The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8629582197/npm-package-wrangler-5409 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5409/npm-package-wrangler-5409 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8629582197/npm-package-wrangler-5409 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8629582197/npm-package-create-cloudflare-5409 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8629582197/npm-package-cloudflare-kv-asset-handler-5409 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8629582197/npm-package-miniflare-5409 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8629582197/npm-package-cloudflare-pages-shared-5409 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8629582197/npm-package-cloudflare-vitest-pool-workers-5409 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
28a181b
to
bcb298e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5409 +/- ##
==========================================
- Coverage 72.44% 72.28% -0.17%
==========================================
Files 331 322 -9
Lines 17298 16663 -635
Branches 4422 4260 -162
==========================================
- Hits 12532 12045 -487
+ Misses 4766 4618 -148 |
bcb298e
to
18ac0fa
Compare
@mrbbot Hey 👋 I understand this is a fix but it actually creates a breaking change for those proxying Miniflare in Node.js. It works in Running Unfortunately, I think there's no way to avoid decompressing the response in undici. The workaround is to remove Related:
cc @hi-ogawa probably relevant for your plugins if you update to |
What this PR solves / how to test
Fixes #5246 (CUSTESC-39344).
This PR updates Miniflare to respect the incoming
Accept-Encoding
header, and set the correct value ofAccept-Encoding
/request.cf.clientAcceptEncoding
inside the Worker. This is to match the production/documented behaviour here: https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#accept-encoding.Author has addressed the following