🐛 BUG: wrangler dev
switches Accept-Encoding
and request.cf.clientAcceptEncoding
#5246
Labels
bug
Something that isn't working
Which Cloudflare product(s) does this pertain to?
Workers Runtime
What version(s) of the tool(s) are you using?
3.34.0 (wrangler)
What version of Node are you using?
18.16.1
What operating system and version are you using?
Ubuntu 20.04.6 LTS 5.4.0-173-generic x86_64
Describe the Bug
Observed behavior
Difference between
wrangler dev
and deployed Cloudflare Worker inrequest.headers.get('accept-encoding')
andrequest.cf.clientAcceptEncoding
.curl -H 'Accept-Encoding: hello' https://shy-leaf-70f4.***.workers.dev/
:curl -H 'Accept-Encoding: hello' localhost:8787
(wrangler dev
):See https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#accept-encoding
The local case is incorrect: The client provided
Accept-Encoding: hello
, sorequest.cf.clientAcceptEncoding
should behello
andaccept-encoding
on the headers should bebr, gzip
orgzip, br
as in the documentation.Expected behavior
curl -H 'Accept-Encoding: hello' https://shy-leaf-70f4.***.workers.dev/
:curl -H 'Accept-Encoding: hello' localhost:8787
(wrangler dev
):Steps to reproduce
A minimal working subset of your worker code
A minimal working subset of your
wrangler.toml
Commands used to start your local dev server, including custom env and cli args
wrangler dev
andwrangler deploy
. Nothing special.Steps to be performed in the browser, curl commands, or a test we can run that reliably fails (at least a percent of the time)
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: