mirror of https://github.com/hzrd149/blossom.git
Clarify has blob endpoint in BUD-01
Require headers to be identical to get endpoint
This commit is contained in:
parent
2aa65cc373
commit
620d74c2a2
|
@ -75,11 +75,11 @@ All endpoints MUST be served from the root of the domain (eg. the `/upload` endp
|
|||
|
||||
## GET /sha256 - Get Blob
|
||||
|
||||
The `GET /<sha256>` endpoint MUST return the contents of the blob with the `Content-Type` header set to the appropriate MIME-type
|
||||
The `GET /<sha256>` endpoint MUST return the contents of the blob in the response body. the `Content-Type` header SHOULD beset to the appropriate MIME-type
|
||||
|
||||
The endpoint MUST accept an optional file extension in the URL. ie. `.pdf`, `.png`, etc
|
||||
|
||||
If the endpoints returns a 301 or 302 redirect it MUST redirect to a URL containing the same sha256 hash as the requested blob.
|
||||
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
|
||||
|
||||
### Get Authorization (optional)
|
||||
|
@ -131,7 +131,9 @@ Example event for retrieving multiple blobs from single server:
|
|||
|
||||
## HEAD /sha256 - Has Blob
|
||||
|
||||
The `HEAD /<sha256>` endpoint MUST respond with either a `200` or `404` status code
|
||||
The `HEAD /<sha256>` endpoint MUST be identical to the `GET /<sha256>` endpoint except that it MUST NOT return the blob in the reponse body per [RFC 7231](https://www.rfc-editor.org/rfc/rfc7231#section-4.3.2)
|
||||
|
||||
The endpoint MUST respond with the same headers that the `GET /<sha256>` endpoint would respond with including the `Content-Type` header and other content headers.
|
||||
|
||||
The endpoint MUST accept an optional file extension in the URL similar to the `GET /<sha256>` endpoint. ie. `.pdf`, `.png`, etc
|
||||
|
||||
|
|
Loading…
Reference in New Issue