workers-sdk
workers-sdk copied to clipboard
[BUG] miniflare aggressively buffers responses
There is a bug in [email protected] causing responses to be aggressively buffered.
It breaks PPR in Next.js with wrangler dev (the response is buffered until everything is ready) - PPR works fine when deployed.
See https://github.com/opennextjs/opennextjs-cloudflare/issues/309
I have a pretty good idea of the the root cause and how to fix that. I'll add more details here later this week and will submit a fix PR.
One workaround for now is to set the Content-Encoding of the response to identity (any value other than gzip or br should do).
/cc @mhart @jasnell as we discussed it earlier