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

Unable to decompress Brotli responses in browser #72

Closed
SupremeTechnopriest opened this issue Oct 28, 2021 · 4 comments
Closed

Unable to decompress Brotli responses in browser #72

SupremeTechnopriest opened this issue Oct 28, 2021 · 4 comments
Labels
bug Something isn't working fixed-in-next Fixed in next release

Comments

@SupremeTechnopriest
Copy link

Hey @mrbbot,

The new next tag is looking pretty good so far! One issue I'm seeing though is that Content-Encoding: br responses aren't able to be decoded by the browser. The browser throws Failed to load resource: net::ERR_CONTENT_DECODING_FAILED.. Im guessing because the response isn't actually brotli encoded.

I get the same error wether or not cache is enabled. You can recreate the issue by performing a subrequest to a server that returns a brotli encoded response.

Let me know if theres any additional information you need in order to resolve the issue. Thanks!

@SupremeTechnopriest SupremeTechnopriest changed the title Unable to decompress Brotli responses in browser on next tag Unable to decompress Brotli responses in browser Oct 28, 2021
@mrbbot
Copy link
Contributor

mrbbot commented Oct 28, 2021

Hey! 👋 Thanks for openning this. Can I check, were you seeing this issue on Miniflare 1 too?

@SupremeTechnopriest
Copy link
Author

I actually wasn't able to get this far on miniflare 1 due to the clone issue described in #59. However, when I manually shimmed undici in, I didn't get this error.

Could it be related to the fix for cause: InvalidArgumentError: invalid connection header thats also described in that issue?

mrbbot added a commit that referenced this issue Oct 30, 2021
Responses with `Content-Type`s including `gzip`, `deflate` or `br`
are now automatically encoded, unless `encodeBody` is set to
`manual`.
@mrbbot mrbbot added bug Something isn't working fixed-in-next Fixed in next release labels Oct 30, 2021
@mrbbot
Copy link
Contributor

mrbbot commented Oct 30, 2021

Hey! 👋 miniflare@2.0.0-next.2 has just been released, including a fix for this. You can find the changelog here. 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 30, 2021
@SupremeTechnopriest
Copy link
Author

Works great! Thanks @mrbbot!

mrbbot added a commit that referenced this issue Jan 7, 2022
Responses with `Content-Type`s including `gzip`, `deflate` or `br`
are now automatically encoded, unless `encodeBody` is set to
`manual`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed-in-next Fixed in next release
Projects
None yet
Development

No branches or pull requests

2 participants