Skip to content

Content-Type / Content-Encoding / Content-Language (HTTP Representation Metadata) #158

@nigoroll

Description

@nigoroll

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 by Tus-Resumable. I know about the pain of making incompatible changes, but I would actually suggest to fix this for a future version of Tus-Resumable and advise tus servers to store the Content-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 key content-type to specify the actual content-type.
  • 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions