-
Notifications
You must be signed in to change notification settings - Fork 229
Open
Description
In the OCI spec, the Content-Range header is specified as:
Content-Range: <range>
where <range> must match the pattern ^[0-9]+-[0-9]+$ (e.g., "0-1023").
However, RFC 7233 (https://datatracker.ietf.org/doc/html/rfc7233) defines the Content-Range header syntax as:
Content-Range: <unit> <range-resp>/<size>
For byte ranges, this could be:
Content-Range: bytes 0-1023/2048
or
Content-Range: bytes 0-1023/*
This OCI spec omits both:
- The unit specifier ("bytes") and
- The total size or "*" after the slash
This inconsistency causes interoperability issues with HTTP libraries and proxies that strictly validate header formats according to RFC specifications. For example, Rust's https://crates.io/crates/headers crate.
The same applies to the Range header. Although the Range header uses slightly different syntax. Also see the syntax block in:
- https://developer.mozilla.org/de/docs/Web/HTTP/Reference/Headers/Content-Range
- https://developer.mozilla.org/de/docs/Web/HTTP/Reference/Headers/Range
This spec should either:
- Make explicit that it uses the standard HTTP headers with non-conforming syntax requirement, where custom validation and parsing must be implemented or
- Use a new oci-dsitribution spec specific header name to which the current requirements can be applied or
- Update the spec to require HTTP RFC compliant values (and update the conformance tests with it)
Metadata
Metadata
Assignees
Labels
No labels