actix-files-v0.7.2

actix/actix-webactix-files-v0.7.2Oct 19, 2026by robjtede

Upgrading?

AI Summary

This release refines the handling of HTTP headers when serving static files, specifically focusing on preconditions and Range headers. It ensures better compliance with HTTP standards by validating requests more strictly and correcting behavior for non-GET methods.

Key Highlights

  • Evaluate request preconditions before processing `Range` headers
  • Ignore `Range` headers for methods other than GET and HEAD
  • Handle `If-Match` and `If-None-Match` with appropriate 412 status codes
  • Accept case-insensitive byte range units and ignore unknown units

New Features

  • Improved conditional request handling (If-Match, If-None-Match, If-Modified-Since, If-Unmodified-Since)
  • Enhanced `Range` header support with case-insensitive units
  • Strict enforcement of GET/HEAD methods for range serving
  • Better error responses for precondition failures

Full Release Notes

- Evaluate request preconditions before processing `Range` headers when serving a `NamedFile`.
- Ignore `Range` headers for methods other than GET when serving a `NamedFile`.
- Ignore `If-Unmodified-Since` when `If-Match` is present when serving a `NamedFile`.
- Respond with 412 Precondition Failed for matching `If-None-Match` on methods other than GET and HEAD when serving a `NamedFile`.
- Ignore `If-Modified-Since` on methods other than GET and HEAD when serving a `NamedFile`.
- Accept case-insensitive byte range units and ignore unknown range units when serving a `NamedFile`.

Related Repositories