tus / tus-resumable-upload-protocol

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

Tus-Extension is ambiguous with respect to Tus-Version #154

Open shand-obs opened 4 years ago

shand-obs commented 4 years ago

Isn't it possible that not every extension reported by Tus-Extension is supported by every protocol version reported in Tus-Version by OPTIONS?

Wouldn't it make more sense for the client to send Tus-Resumable and have the server respond with the extensions supported by the server for the requested protocol version?

Could something be added to the protocol to reveal which extensions are supported by the server for each/any supported protocol version?

Acconut commented 4 years ago

Isn't it possible that not every extension reported by Tus-Extension is supported by every protocol version reported in Tus-Version by OPTIONS?

Yes, such situations are possible but I don't think that a problem. Let me explain: If we introduce the extension XYZ in version 1.2 of the tus protocol, the server might return something like this for OPTIONS requests:

Tus-Extension: XYZ
Tus-Version: 1.0.0, 1.1.0, 1.2.0

In this case, there is not direct information about which versions of the tus protocol support XYZ but if the client supports XYZ, it can also now that it has been introduced in version 1.2. Based on that, it is apparent that version 1.0.0 and 1.1.0 do not support XYZ.

Therefore, I don't think the current approach to extension discovery is problematic. Does that make sense?