cloudflare / cloudflare/workerd
Accept-Encoding Header Mismatch Between Real Request and Worker
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
### What versions & operating system are you using?
wrangler 4.33.2
System:
OS: Linux 6.14 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
Binaries:
Node: 24.6.0
### Please provide a link to a minimal reproduction
_No response_
### Describe the Bug
### Description
There is a discrepancy between the actual `Accept-Encoding` header sent by the client and what the application receives through the Cloudflare Worker.
### Expected Behavior
The application should receive the same `Accept-Encoding` header value that was originally sent by the client.
### Actual Behavior
The `Accept-Encoding` header values differ across different sources:
- **Real Request (sent by client):** `Accept-Encoding: "gzip, deflate, br, zstd"`
- **Application Request (`req.headers()`):** `Accept-Encoding: "gzip, br"`
- **Local Server(wrangler dev) Cloudflare Context (`req.cf`):** `clientAcceptEncoding: "gzip, deflate, br, zstd"`
- **Remote Server Cloudflare Context (`req.cf`):** `clientAcceptEncoding: "gzip, deflate, br"`
### Similar Errors
cloudflare/workers-sdk#5246
### Please provide any relevant error logs
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.