workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

Wrangler assets doen't support HTTP 1.1 byte serving, but Vite-plugin does creating prod & dev mismatch

Open chr33s opened this issue 1 year ago • 1 comments

Which Cloudflare product(s) does this pertain to?

Wrangler

What versions & operating system are you using?

wrangler 4.10.0, @cloudflare/vite-plugin 1.0.5, nodejs 22.14.0

Please provide a link to a minimal reproduction

No response

Describe the Bug

When previewing a worker locally using the vite plugin HTTP 1.1 byte serving works as expected, when using wrangler dev or wrangler deploy version it doesn't creating a mismatch between dev & prod if using the vite plugin.

Would be nice if wrangler assets supported Accept-Ranges header.

Please provide any relevant error logs

No response

chr33s avatar Apr 16 '25 03:04 chr33s

Thanks for the report. Workers static assets don't currently support byte-range requests, so a Range header is ignored and the whole file is returned with a 200 in wrangler dev, vite preview and production alike, while vite dev differs only because Vite serves your public directory itself. Adding range support would be a change to the product, which we track at https://github.com/cloudflare/workers-sdk/discussions/16894, so please follow and upvote it there.

workers-devprod avatar Nov 13 '26 13:11 workers-devprod