actix-web icon indicating copy to clipboard operation
actix-web copied to clipboard

Disallow compression for partial content

Open valaphee opened this issue 1 year ago • 1 comments

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

valaphee avatar Jul 13 '24 15:07 valaphee