-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
For HTTP responses, Content-Type is de-facto required to avoid user-agents having to guess mime-types (the RFC says SHOULD be generated). Content-Encoding MUST be generated IFF an Encoding (like gzip or brotli) is used and Content-Language is optional.
So the question arises how TUS handles this standardized metadata. My personal expectation would be that a tus server implementation should, by default, store the metadata for use of the component delivering it, but...
- Content-Type, unfortunately, MUST be set to
application/offset+octet-stream
as per the protocol definition, so it cannot be used to specify the actual mime type of the uploaded object:- In hindsight, I am not so sure if it was a good decision to force this
Content-Type
value, in particular, as TUS is already uniquely identified byTus-Resumable
. I know about the pain of making incompatible changes, but I would actually suggest to fix this for a future version ofTus-Resumable
and advise tus servers to store theContent-Type
header sent with the creation request with the object for later delivery. - Alternatively, I think that TUS should at least define the
Upload-Metadata
keycontent-type
to specify the actual content-type.
- In hindsight, I am not so sure if it was a good decision to force this
- Content-Encoding and Content-Language are not used by TUS, so I think the protocol should advise tus servers to store them with the object.
Metadata
Metadata
Assignees
Labels
No labels