- From: Marius Kleidl <ietf@mariuskleidl.net>
- Date: Fri, 04 Sep 2026 20:05:54 +0200
- To: ietf-http-wg@w3.org, Chris Martinez <chris.s.martinez@outlook.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Hello Chris, Thank you for sharing your feedback and the interest in this topic. Please find my responses inline. Am 4. September 2026 01:28:26 MESZ schrieb Chris Martinez <chris.s.martinez@outlook.com>: >Hi all, > >I'm new to the working group. I've been implementing partial uploads >and wrote up an individual draft before I discovered the WG's >resumable upload work: > > https://datatracker.ietf.org/doc/draft-martinez-partial-content-uploads/ > >Having now read it properly, it covers a lot of the same ground and >covers much of it better. I'm not looking to pursue a parallel >document. Concurrent appends is at least one area where I think my >approach adds something. I have thoughts on a few other areas that >I'll raise separately rather than pile them into one thread. > >Section 4.6 says: > > Resumable uploads, as defined in this document, do not permit > uploading representation data in parallel requests for the same > upload. The client MUST NOT perform multiple representation data > transfers for the same upload resource in parallel, or perform > representation data transfers while the creation of the same upload > resource is still in progress. > >and then requires servers to "take measures to prevent race >conditions, data loss and corruption from concurrent requests," with a >SHOULD to terminate the previous request when a new one arrives. > >I see this text was tightened recently in response to issue #3485, and >I want to be clear that what follows is orthogonal to that. That issue >was about the prohibition being scoped imprecisely. My concern is that >the prohibition has no detection mechanism at all. It is stated as >client conformance plus unspecified server behavior with nothing on >the wire. > >Upload-Offset does function as a precondition, and it handles the case >it was designed for: a client racing itself. Two requests targeting >the same offset cannot both win and the loser gets a 409. > >What an offset cannot express is identity. Consider two clients that >both hold the same upload URL: > > Client A: PATCH, Upload-Offset: 0 (server offset -> 100) > Client B: PATCH, Upload-Offset: 100 (server offset -> 200) > Client A: PATCH, Upload-Offset: 200 (server offset -> 300) > >Every request is individually valid. Every offset check passes. The >server has no way to know the resulting representation is spliced from >two sources and neither client learns anything is wrong. The upload >completes and validates. > >Section 4.6 forbids this, but nothing detects it. It rests on the >upload URL not being shared, which holds right up until it doesn't: a >URL persisted and resumed by a second process, a client library used >from two threads, a handoff between foreground and background >uploaders, or the same logical upload attempted from two machines. The upload URL could be shared between different entities, whether that be processes, threads, nodes, devices etc. For example, there might be cases where an upload is resumed by another entity because the entity that originally started the upload is no longer available. Or different parts of the representation reside on different nodes. These use cases seem niche, but they are possible and there isn't a good reason to prohibit them. But the expectation is that these entities coordinate themselves so that they appear as a single client to the server and don't trip on each other toes. Any other behavior would be a fault in the implementation in my opinion. Your example above is a good demonstration of how two clients can coordinate to upload one representation. >The approach I took was to have the server issue an entity tag when >the upload resource is created and have appends carry it in If-Match >with 412 on mismatch and 428 when it is absent. That separates >identity from position. The offset says where you are; the tag says >which upload sequence you belong to. A second client appending at a >valid offset with a stale or absent tag is rejected explicitly rather >than silently accepted. It is ordinary RFC 9110 conditional request >handling rather than a new mechanism. The entity tag seems to fulfill a similar purpose as the upload URL. They are both server-generated values that are included in the client's requests to identify to which representation the appended data belongs to. In your case, this value is included in a header. In the draft, it's in the request URL. >There is a second benefit I did not anticipate when I started. Today, >if two clients happen to target the same logical resource, the first >incomplete transfer effectively blocks the second until it completes >or the upload expires. An entity tag lets those operations interleave >with a predictable failure mode instead of an indefinite wait. Can you elaborate what you mean by logical resource? It is possible to start two uploads against the same resource. For example, two representations can be uploaded to /projects/123/attachments at the same time as they would create two different upload resources with distinct URLs. >To be clear about what I am not proposing: my own draft makes If-Match >REQUIRED, which is heavier than I think this document would want, and >I am not attached to that. The transplantable part is optional. A >server that cares about this case can issue a tag and reject appends >that don't carry it, and clients that don't participate behave exactly >as they do today. > >There is a cost, of course - another field on every append and potentially >more state for the server to keep. The "don't share the upload URL" may >simply be the right answer for this document's scope; however, a >resource with well-known source file path might produce a shared >upload URL organically. If not sharing the URL is the expectation, I think >that it is worth stating explicitly because a reader of 4.6 today can >reasonably conclude the server is meant to be detecting this and there >is nothing for it to detect with. > >Related to that and offered more tentatively, if a deterministic >mechanism exists, the MUST NOT may be stronger than it needs to be. >Whether a second transfer against the same upload is handled >optimistically or pessimistically could reasonably be left to origin >server policy. > >I'm happy to move this to the issue tracker if that's a better home, >or to write it up as a PR if there's interest. > >Regards, >Chris > > Best regards, Marius
Received on Friday, 4 September 2026 18:40:35 UTC