-
Notifications
You must be signed in to change notification settings - Fork 73
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
Clarifications on what it means for an upload to be "finished" #222
Comments
Hello and thanks for these questions!
An upload is considered finished if and only if its
Yes, that is correct. An empty PATCH request shall be used in this case.
I am a bit confused about your question here. The cited statement refers to situations when the I hope my response is still helpful to you! |
OK, that makes sense. I think it would be great to state explicitly in the Spec or FAQ.
Ah, yes. The other statements immediately before all started with "The response to a HEAD request" or "The Server MUST respond with". I understood the absence of those such that "The Also, the sentence ends with "at the time of the request". I think it would be clearer to say "at the time of the response" or "at the time the request is handled", given that it is talking about the server. My questions are answered, thanks! Please feel free to close the issue unless you want to use it for tracking any FAQ updates / wording clarifications, in case you decide to make any. |
I have a couple questions regarding the concept of uploads finishing in the spec (https://tus.io/protocols/resumable-upload.html).
The
Expiration
andTermination
extensions talk about "finished" and "unfinished" uploads, but it is neither defined what that means nor stated that these terms are explicitly undefined and it is communicated out-of-band whether an upload is finished. The only cases where a concept of "finished" is easily available are:Concatenation
extension, where one could easily argue that the "final" upload makes that upload "finished".Creation
extension is used and eitherUpload-Length
was set at the beginning, orUpload-Defer-Length
was used and with a subsequentBut these are extensions; likely other independent extensions shouldn't depend on them for semantics.
The Core protocol has only 1 ocurrence of the
Upload-Length
header, namely in the response to theHEAD
request:Thus, it would be great to have the following clarifications stated somewhere explicit in the FAQ:
The Core protocol does not define a notion of when an upload is finished. At any given time it is unknown whether more data will be added to an Upload.
In the
Creation
extension, regardingthere is the case that a client sent a previous
PATCH
request, and then later learns that there is no more data. In this case, I suppose the client would send aPATCH
request with an empty body and sets theUpload-Length
header for it (this is what e.g. thetus.py
client does, see Setting ofUpload-Length
with emptyPATCH
request? cenkalti/tus.py#8).If this is how it's supposed to work, might be nice to state that in the FAQ, because implementing a server I wasn't at first sure what to do with empty
PATCH
requests.I believe the following is a bit unclear in the spec:
Concatenation
extension:POST
requests that setUpload-Concat: partial
? Or also thePATCH
request, that transmit the data (similar to "set theUpload-Length
header in the nextPATCH
request" from theCreation
extension)? If the latter, it's confusing that this wording doesn't use "in the nextPATCH
request; the current wording implies that if if the client knows the length all the way from the beginning to the end, theUpload-Length
header MUST be included in each of the request (but the subsequent "Example" doesn't show that happening).It seems beneficial to me to word that logic exactly like in the
Creation
extension.Thanks for considering / answering those points!
The text was updated successfully, but these errors were encountered: