Clarify requirements around Content-Type and Content-Length

- Specify that the server must return the MIME type in the Content-Type header for blob retrieval.
- Clarify fallback behaviour for unknown MIME types to application/octet-stream.
- Improve the description of how servers should infer MIME types and handle Content-Length for mirror requests.
This commit is contained in:
Anthony Accioly
2025-06-04 19:58:02 +01:00
parent 5ef2889547
commit cacfa520dd
2 changed files with 10 additions and 2 deletions

View File

@@ -79,6 +79,9 @@ The `GET /<sha256>` endpoint MUST return the contents of the blob in the respons
The endpoint MUST accept an optional file extension in the URL. ie. `.pdf`, `.png`, etc
Regardless of the file extension, the server MUST return the MIME type of the blob in the `Content-Type`
header. If the server does not know the MIME type of the blob, it MUST default to `application/octet-stream`
If the endpoint returns a `301` or `302` redirect it MUST redirect to a URL containing the same sha256 hash as the requested blob.
This ensures that if a user was to copy or reuse the redirect URL it would still contain the original sha256 hash