Re: Draft for Resumable Uploads

Eric J Bowman <mellowmutt@zoho.com> Mon, 11 April 2022 23:54 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9243C3A122D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 11 Apr 2022 16:54:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.759
X-Spam-Level:
X-Spam-Status: No, score=-2.759 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.248, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); domainkeys=pass (768-bit key) header.from=mellowmutt@zoho.com header.d=zoho.com; dkim=pass (1024-bit key) header.d=zoho.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sWRwOTuRvn_r for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 11 Apr 2022 16:53:56 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C25343A121C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 11 Apr 2022 16:53:56 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ne3nh-0002D8-HB for ietf-http-wg-dist@listhub.w3.org; Mon, 11 Apr 2022 23:50:29 +0000
Resent-Date: Mon, 11 Apr 2022 23:50:29 +0000
Resent-Message-Id: <E1ne3nh-0002D8-HB@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <mellowmutt@zoho.com>) id 1ne3ng-0002CE-6l for ietf-http-wg@listhub.w3.org; Mon, 11 Apr 2022 23:50:28 +0000
Received: from sender4-pp-o91.zoho.com ([136.143.188.91]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <mellowmutt@zoho.com>) id 1ne3ne-0007BX-HD for ietf-http-wg@w3.org; Mon, 11 Apr 2022 23:50:28 +0000
ARC-Seal: i=1; a=rsa-sha256; t=1649721010; cv=none; d=zohomail.com; s=zohoarc; b=g0XavComiVI63MI+o+SPJqOnamL3YkFI2sce0uFEZkggzFXPgZSAxQwInpTeF+2RZTarwVPaY2ZzurJlnSpXRsB2xCCQTha94Q7jUhltuVWZYkHkxySPiRZiWWpVMhUVlsw42OwMr5R7x6c+Mg70NXAFfq0Ub0BGBHk+4ar1tDM=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649721010; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=OdeGkJ1TdH1fbn6Zb/W3kcuRLnTcU49Adk+4aHP7fiY=; b=eLvpq4KzTCavzgbc3riRTxamWfs0YS+cm2BgOmEYYqcnJ/FIy5bJsTF+JySLYPQRV4ZkLFv7iQ5IpfFgUSEFSQWogMa10dlY/qAN5WgvnGJNlOyl9r/e2d6vjZy0unMkrBtd/Z1wB8Kn0wcwzp83elLtKdtAIKLdDOAxInjsXEQ=
ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=mellowmutt@zoho.com; dmarc=pass header.from=<mellowmutt@zoho.com>
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=date:from:to:cc:message-id:in-reply-to:references:subject:mime-version:content-type:user-agent; b=Xu3vikVMIz7QXKIzwSgxL2NqZqXmK/2pwBLMU4v29CNZLqPIWEXwkxQrp6WXL0Jlky56QPnKRWYT Ynn4K/jVrVry3HxmQdkwAg/0RSD0pVytspttyDwI4FZYVMIQ27GC
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1649721010; s=zm2022; d=zoho.com; i=mellowmutt@zoho.com; h=Date:Date:From:From:To:To:Cc:Cc:Message-Id:Message-Id:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Reply-To; bh=OdeGkJ1TdH1fbn6Zb/W3kcuRLnTcU49Adk+4aHP7fiY=; b=f+5oxglj+i8Uqp9xnxmvtI+3gK6bste4A5lqKSBkLk4W0m6cb5GkOvZ7+gol54AV i+74ffwvF0J8R6Onm5aE9Tr/0DZ+T5f29XiEcmwnkRttqRBEFzMz4pFkzYYZ7yEqgkg pOQYExii1hvppaC/bCqjtFOcwmTAq0ePfXmw4bFc=
Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1649721008558386.83046252452345; Mon, 11 Apr 2022 16:50:08 -0700 (PDT)
Received: from [65.117.211.248] by mail.zoho.com with HTTP;Mon, 11 Apr 2022 16:50:08 -0700 (PDT)
Date: Mon, 11 Apr 2022 16:50:08 -0700
From: Eric J Bowman <mellowmutt@zoho.com>
To: Austin William Wright <aaa@bzfx.net>
Cc: Julian Reschke <julian.reschke@gmx.de>, Guoye Zhang <guoye_zhang@apple.com>, ietf-http-wg <ietf-http-wg@w3.org>
Message-Id: <1801b08e175.b02a17bb122378.8946410549355222536@zoho.com>
In-Reply-To: <FB7AE0DD-0245-45F2-A728-0F72F5651C8D@bzfx.net>
References: <CANY19NvMcPQaHRamFe-yy-E38xKo2XrmFCKVRoPbyBMQhoY6vA@mail.gmail.com> <82FAD6B4-F72F-42E0-A72D-4BFAAB9668FD@gbiv.com> <EA8A9F25-D49F-41DE-B98E-A013E1E68CAF@apple.com> <6e64f598-e82b-bff5-5ed9-c3c3f4b01439@gmx.de> <C6907036-146C-4FAB-938E-238473CB42B4@apple.com> <17ff7558cda.10ad81f8113705.2829201994677815148@zoho.com> <2FADC394-0954-4AA2-8F55-6CDF88833CB3@apple.com> <17ff85458eb.119b6ffbd16630.2281063094525551184@zoho.com> <a0670d54-d999-807c-23e2-95e357e73104@gmx.de> <17ff868f14e.d111a4c016833.788757655885004970@zoho.com> <4c1aabee-bc23-6d19-2e5d-8fdf3b3532ad@gmx.de> <892B7A86-57D0-4B21-9899-65EF3FA84A12@bzfx.net> <17ffd4d64d2.c4f12f9734385.3620821323075353432@zoho.com> <904B5382-ADCA-461F-B47C-583874D4FB55@bzfx.net> <17ffe8ddd90.1257859fc38181.7721145847915462132@zoho.com> <54BB33F9-DF98-48DB-BA2B-C8A63208BA21@bzfx.net> <1800309bddc.ec99308354061.3626360867795203460@zoho.com> <FB7AE0DD-0245-45F2-A728-0F72F5651C8D@bzfx.net>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_305543_376397454.1649721008501"
Importance: Medium
User-Agent: Zoho Mail
X-Mailer: Zoho Mail
Received-SPF: pass client-ip=136.143.188.91; envelope-from=mellowmutt@zoho.com; helo=sender4-pp-o91.zoho.com
X-W3C-Hub-DKIM-Status: validation passed: (address=mellowmutt@zoho.com domain=zoho.com), signature is good
X-W3C-Hub-DKIM-Status: validation passed: (address=mellowmutt@zoho.com domain=mellowmutt@zoho.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-4.1
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1ne3ne-0007BX-HD 658f6de9f5be11a17be4eda85f69f733
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Draft for Resumable Uploads
Archived-At: <https://www.w3.org/mid/1801b08e175.b02a17bb122378.8946410549355222536@zoho.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/39990
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

All snark aside (sorry about that, Austin, all)...









>

>-----------------

https://httpwg.org/specs/rfc5789.html#patch:




If the Request-URI does not point to an existing resource, the server MAY create a new resource, depending on the patch document type (whether it can logically modify a null resource) and permissions, etc.





So as long as the PATCH media type can describe creating a resource (which this does), PATCH can create resources.

>-----------------

>








The reason I think this is bad protocol design to the point it makes my brain explode, is it introduces the notion that method semantics vary by media type. The interface is now resource-specific, rather than generic. Transparency is lost because the message is not self-descriptive, e.g. intermediaries would require a lookup table of media types in order to determine method semantics.



>

>-----------------

This is also my understanding of how filesystems work. You don’t have a separate create operation, any write to a file creates it (depending on the flags that are set). You can even write to a nonzero offset and it will create a sparse file.

>-----------------

>








My bad for bringing up OS / FS. A uniform network interface to a collection of resources is its own problem space. An OS doesn't need to worry about an unreliable connection, let alone intermediaries, for filesystem ops.



>

>----------------

>





> But how would the user-agent know this isn’t intentional?

> How would it know the file is actually incomplete?

>







Because 206 response code.







Ok, so undefined byte ranges would not be returned by the server, is this your understanding?

>----------------

>







My understanding is that the server only knows it never received the entire upload. It isn't attempting to render the payload, in order to determine anything about *how* the partial upload breaks due to not being complete, let alone convey that information to the client -- because surely the client can figure that out by diff'ing the 206 response payload.



>
>----------------
All clients see the same resource, correct? Suppose I’m doing a segmented upload, and I finish the first half of the upload. If I make a GET request, I would expect to see 206 showing the defined bytes. But what about other users that don’t support this response? How do I ensure they’re not downloading a mangled file? Should this return a 4xx error if the client doesn’t support partial content responses?

>----------------




>



Mangled representations are a fact of life on the Web. So are 200 OK responses which say "not found" in the message body. If you're concerned that a failed upload shouldn't result in a borked retrieval, don't update the resource. If you want to give user-agents a hint about where the upload failed, I suggest 206; and acceptance of the fact that a 200 OK response doesn't imply a valid representation, which is a feature of Web architecture, not a bug -- tightly-coupled architectures fail to scale, while the Web has scaled exponentially for 30 years by allowing this sort of thing.



-Eric