fix: clarify Content-Type handling for blob retrieval and mirroring

This commit is contained in:
Anthony Accioly
2025-06-04 20:15:03 +01:00
parent cacfa520dd
commit 1a085ed7bf
2 changed files with 8 additions and 7 deletions

View File

@@ -28,9 +28,9 @@ The `/mirror` endpoint MUST download the blob from the specified URL and verify
The endpoint MUST return a [Blob Descriptor](#blob-descriptor) and a `2xx` status code if the mirroring was successful
or a `4xx` status code and error message if it was not.
Servers SHOULD use the `Content-Type` header returned from the requested URL to infer the mime type of the blob. If the
`Content-Type` header is not present they SHOULD attempt to detect the `Content-Type` from the blob contents and file
extension, falling back to `application/octet-stream` if they cannot determine the type.
The destination server SHOULD use the `Content-Type` header returned from the origin server to infer the mime type of
the blob. If the `Content-Type` header is not present the destination server SHOULD attempt to detect the `Content-Type`
from the blob contents and file extension, falling back to `application/octet-stream` if it cannot determine the type.
Servers MAY use the `Content-Length` header to determine the size of the blob.