-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content-Type / Content-Encoding / Content-Language (HTTP Representation Metadata) #158
Comments
For good reason, in my mind. If I send a PATCH request with the second half of a PNG image, the content type of that request is not
Good idea. tusd and Uppy.js already use the |
re @Acconut HTTP does not use that strict a definition: https://httpwg.org/specs/rfc7231.html#header.content-type
and then in https://httpwg.org/specs/rfc7231.html#representations
TUS So while I understand how this came about, I still think that changing the use of That said, even if you decided to not change it for a future protocol version, I agree that some metadata values should be reserved for these semantics. |
That's interesting, good to know. Thanks for bringing it up!
Yes, I would like to do that. tus clients already have to specify custom headers, so adding the upload metadata header is not a problem in my mind.
Absolutely, we should definitely do that! |
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...
application/offset+octet-stream
as per the protocol definition, so it cannot be used to specify the actual mime type of the uploaded object: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.Upload-Metadata
keycontent-type
to specify the actual content-type.The text was updated successfully, but these errors were encountered: