- From: Chris Martinez <chris.s.martinez@outlook.com>
- Date: Fri, 4 Sep 2026 16:31:21 -0700
- To: Marius Kleidl <ietf@mariuskleidl.net>, ietf-http-wg@w3.org
Hi Marius, For specific types of interactions, the upload URL is sufficient; however, I do not believe that to be true for all use cases. On 9/4/2026 11:05 AM, Marius Kleidl wrote: >> MK> 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. I use the word "logical" because the resource in question may have the same identifier, but that is not a guarantee it is actually the same resource. The provided example of posting a resource to /projects/123/attachments makes sense that the server defines the resource URL and it it is distinct. This scenario presumably adds an attachment resource without the client knowing the resource identifier ahead of time. Consider that the resource in question must be unique. Posting to /vm/images/example%2Eiso uploads a 100GB file. In this scenario, the upload URL can still exist, but it might be the same as the posted URL. The desired client outcome is to have a single, uploaded resource available for other clients to access or subsequently download. >> MK> 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. While every uploaded resource is unique, the upload URL is sufficient. Once the resource is shared, it is not. The server cannot guarantee that something hasn't changed, which is the classic lost update problem that entity tags are meant to solve. The entity tag can provide opaque metadata from the server for a client to echo back so the server can be sure both sides are still referring to the same upload. If the entity tag is shared, then multiple clients could participate in a parallel upload. In the current proposal, the concurrency precondition is handled by Upload-Offset, but that precludes parallelism because the content must be uploaded linearly unless I have misunderstood. The workload can be divided, but only one client can upload at the known offset at a time. I have thoughts on parallelism, but concurrency must be addressed first. I wanted this thread to be focused without too many tangential topics. Succinctly, a strong entity tag would enable currency enforcement and allow partial upload operations in parallel, even if the content is out of order, re-transmitted, or the uploaded partial content overlaps. Reassembly is at the discretion of the server. Consider the following 100GB upload posted to /vm/images/example%2Eiso: CLIENT A: initiates an upload CLIENT A: uploads 25GB CLIENT B: initiates a different upload, which also happens to be 100GB The proposal would prevent CLIENT B from starting an upload. This can be problematic for a shared resource if CLIENT A doesn't finish in a timely manner. An entity tag solves this by invalidating the CLIENT A upload and starting anew with CLIENT B. Parallelism is possible, irrelevant of the Upload-Offset, because any client that knows the current entity tag can participate in the same upload. What I found to be useful in a strong entity entity included: - UUID representing the operation - Upload length - Encoded last modified date The value is serialized and Base64-encoded. This is an example and not something I am suggesting should be included in the proposal. What and how information is stored in the entity tag is at the discretion of the server. This information, however, could be included as a recommendation as to what a server should track in an entity tag. An upload that always produces a unique resource on a server need not have an entity tag. If we agree there is a use case where the upload URL is insufficient on its own, I would suggest that it is at least recommended that all responses include an entity tag so that clients have a consist method of handling concurrency, even when the entity tag is not required. A server can elect whether they follow the guidance. HEAD requests for a shared resource will face the same challenge. A HEAD request scoped to a distinct upload URL is fine. If the uploaded resource is shared, then there is not currently way to determine if the response corresponds to the same upload. A 412 response from a HEAD request with a If-Match that doesn't align to an entity tag informs a client that their upload is no longer valid. Best regards, Chris On 9/4/2026 11:05 AM, Marius Kleidl wrote: > 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 23:31:29 UTC