actix-web
actix-web copied to clipboard
Disallow compression for partial content
PR Type
Bug Fix
PR Checklist
- [x] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [x] A changelog entry has been made for the appropriate packages.
- [x] Format code with the latest stable rustfmt.
- [x] (Team) Label with affected crates and semver status.
Overview
Currently, Content-Encoding: identity is used to prevent compression. But per RFC it should not be send, and Firefox seems to error if Ranges are combined with Content-Encoding. This PR solves the error by removing the usage of the header and stop the middleware from compressing Partial Content as the compression middleware will never be able to compress this kind of response.
Fixes https://github.com/actix/actix-web/issues/3191