tus / tus-resumable-upload-protocol

Open Protocol for Resumable File Uploads
https://tus.io
MIT License
1.48k stars 103 forks source link

Clarify OPTIONS requests wrt Tus-Resumable and Tus-Version headers #153

Closed butonic closed 4 years ago

butonic commented 4 years ago

From https://tus.io/protocols/resumable-upload.html#options

A successful response indicated by the 204 No Content or 200 OK status MUST contain the Tus-Version header. It MAY include the Tus-Extension and Tus-Max-Size headers.

The Client SHOULD NOT include the Tus-Resumable header in the request and the Server MUST ignore the header.

From https://tus.io/protocols/resumable-upload.html#tus-resumable

The Tus-Resumable header MUST be included in every request and response except for OPTIONS requests. The value MUST be the version of the protocol used by the Client or the Server.

If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status and MUST include the Tus-Version header into the response. In addition, the Server MUST NOT process the request.

So we should omit the Tus-Resumable header from the OPTIONS request and clarify the example