Worker is forcing to encode body for text/plain even it's a HEAD request

Hi everyone. Just as the title said, if the Request have header Accept-Encoding: br, and response Content-Type is text/plain, workers will forcing to encode body to br, Even it's a HEAD request, and the body is actually empty. That caused the Conteht-Length header got removed from response by worker, and my application can't determine how big is the file. The best(maybe?) practice to solve it on client-side is set Accept-Encoding to identity But this solution won't work on browser, because browser doesn't allow to change Accept-Encoding header. I understand this behavior is fully RFC compatible, but in this case, it was not possible to get Content-Length in browser without any hack (like custom x-content-length header). So is there any suggestion of settings of browser HEAD, or is there any chance of this server-side behavior being change in future ?
No description
1 Reply
koreyoshi_re
koreyoshi_reOP11mo ago
For demo its gzip You are right, the worker head implementation is rfc compliant Topic updated. For now the core issue is that not possible to get content-length on browser without any hack..
Want results from more Discord servers?
Add your server