R2 bindings and compressed content without content-encoding or content-length

What is the name of the domain?

some-demo-page.pages.dev

What is the issue you’re encountering

Development console show the transferred content as not compressed

What steps have you taken to resolve the issue?

I’m serving a json file from R2 binding and cloudflare pages (same file, for testing purposes)

The json from cloudflare pages is served compressed from cache with (477 bytes)
The json from R2 looks like transfer 35,7KB

I receive “x-content-encoding-over-network: br” header

I suspect that the content is in fact compressed (manually tested with curl) but the browser not show the correct information due the lack of “content-encoding” or “content-length” headers".

If suspect that the content is really compressed and is just a visualization issue.

Any Idea about why cloudflare pages and R2 not show the real data on the developer console?
I need to take any manual action to improve the cache hit? like e-tag?

What are the steps to reproduce the issue?

Test any json file with and without accept-encoding header
curl -so /dev/null ‘https://yourdomain/data.json’ -H ‘accept-encoding: gzip, deflate, br, zstd’ -i -w ‘%{size_download}’
curl -so /dev/null ‘https://yourdomain/data.json’ -i -w ‘%{size_download}’

Screenshot of the error

This topic was automatically closed after 15 days. New replies are no longer allowed.