As developers migrate existing applications to Rust, ensuring seamless backward compatibility is crucial. Many of these applications already recognize "x-gzip" as a valid encoding for gzip. Adhering to RFC9110, which advises treating "x-gzip" as synonymous with "gzip", we can facilitate a smoother transition for these applications. This change streamlines the migration process and ensures that our Rust-based solutions remain backward compatible, fostering wider adoption and minimizing potential integration issues.
Solution
Added || s.eq_ignore_ascii_case("x-gzip") to content_encoding.rs:64 with additional tests:
1.
Should compress response with gzip
And return content-type: gzip
When accept-encoding is x-gzip
2.
Should compress response with gzip
When accept-encoding has both x-gzip and deflate
(to test that it's treated the same as gzip for ordering)
Implements #466
Motivation
From #466
Solution
Added
|| s.eq_ignore_ascii_case("x-gzip")
to content_encoding.rs:64 with additional tests: 1. Should compress response with gzip And return content-type: gzip When accept-encoding is x-gzip 2. Should compress response with gzip When accept-encoding has both x-gzip and deflate (to test that it's treated the same as gzip for ordering)