http-extensions icon indicating copy to clipboard operation
http-extensions copied to clipboard

RESUMABLE: opportunity to improve text on server behavior

Open LPardue opened this issue 4 months ago • 4 comments

@gstrauss provided the following feedback on https://lists.w3.org/Archives/Public/ietf-http-wg/2025JulSep/0094.html wrt Section 4.2.2

"The resource targeted by this initial request is responsible for processing the representation data transferred in the resumable uload according to the method and header fields in the initial request..."

This wording is confusing with wording earlier in the doc that the upload resource is responsible for keeping state. The upload resource must keep state, including the original target resource. Once the upload resource is complete, only then does the server pass the complete upload resoure to the original target resource for processing.

That is quite a requirement to be so subtle! This suggests that the server MUST save the ENTIRE set of request headers of the initial request alongside the upload resource, and then manipulate the request headers with final length, possibly remove Upload-*, or more, before finally sending a complete upload resource to the initial resource target for processing.

Further analysis is need to figure out if changes on this topic would be editorial (ensuring wording matches current intent) or if there are other normative changes that get surfaced.

LPardue avatar Aug 11 '25 22:08 LPardue

OT: I sketched a different design for resumable uploads in #3176 but am linking since it might provide context to my thinking when reading others issues like this one.

gstrauss avatar Aug 13 '25 06:08 gstrauss

This suggests that the server MUST save the ENTIRE set of request headers of the initial request alongside the upload resource, and then manipulate the request headers with final length, possibly remove Upload-*, or more, before finally sending a complete upload resource to the initial resource target for processing.

This would be one way to implement the upload handling, but other implementation approaches also exist. For me, this is an implementation detail and does not have to be mandated by the specification. Instead, the text tries to define the expected behavior that is necessary to achieve interoperability between clients and server. At least that was the intention, but we should look over the text and see if the wording can be improved.

Acconut avatar Sep 26 '25 22:09 Acconut

My mental model of resumable upload is that it's just a prolonged regular upload. Request headers should be supplied at the beginning, and maybe consider trailers if some fields need to be updated at the end of the upload, or perform a separate transaction. I think the requirement should be kept as is.

guoye-zhang avatar Sep 27 '25 19:09 guoye-zhang

I agree with @guoye-zhang on this one. Could we get an example to highlight the issue described in the original email?

smatsson avatar Oct 14 '25 08:10 smatsson