Re: Draft for Resumable Uploads

Eric J Bowman <mellowmutt@zoho.com> Wed, 06 April 2022 11:09 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 2CFCA3A1924 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 6 Apr 2022 04:09:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.758
X-Spam-Level:
X-Spam-Status: No, score=-2.758 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_DNSWL_BLOCKED=0.001, 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 IqmSd1uvd79C for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 6 Apr 2022 04:09:00 -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 DAEB23A182C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 6 Apr 2022 04:08:58 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1nc3Up-0004sN-7E for ietf-http-wg-dist@listhub.w3.org; Wed, 06 Apr 2022 11:06:43 +0000
Resent-Date: Wed, 06 Apr 2022 11:06:43 +0000
Resent-Message-Id: <E1nc3Up-0004sN-7E@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 1nc3Uo-0004rU-Cb for ietf-http-wg@listhub.w3.org; Wed, 06 Apr 2022 11:06:42 +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 1nc3Um-0008I6-OM for ietf-http-wg@w3.org; Wed, 06 Apr 2022 11:06:42 +0000
ARC-Seal: i=1; a=rsa-sha256; t=1649243185; cv=none; d=zohomail.com; s=zohoarc; b=gCZ0a9qt1ZSHanOwMUXYfE3sQb6flnwJGtgpAdMOQ3JnbleGEegz52sdwu8QyzfNqlpNgL+apSsu3WaTgvHaga+dDDD+9WCbvAhkFDvJtnFAeE3utsVXaPgZCTxCqBszFGqHypEfT6kKBf+Ia/kwKTiXRXjz0f73T7/NQb7AyBI=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649243185; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=pQ84Wi5jmfQCqik3m8+AkKjFMiTz355lTRzBDmLaBxw=; b=T6xr8nWItJz+B3W8Z9NqOEfWg/DA/UGsDwU6rUNsjb1SkWAl3YKAgHstR8RKDZ6EC36XhaW3os+sNLrpPr27/c4ICZ6njhDVEYQja6GmTNKrPDZ8KN7LF8qY/YwKjSOO/iYNJKcdiUcWSZhSlYbs7Y5fz4dK0MKsUFeHzSXmREk=
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=FH1T7zsXZd7OwNSMZCeq7NuEHkJaAHs3qqukzZuQyDbCr33pMwS8FNhJkQygETQ0X69oUhH7wvi/ 92S+5kCI9+fZC+dkgxn04tv8rAxTaGAEuUjUq49rKj6xOfJevmt6
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1649243185; 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=pQ84Wi5jmfQCqik3m8+AkKjFMiTz355lTRzBDmLaBxw=; b=PYsF8UNwu4DaREefByB3UoC7U/GRlTzqRVyYgLIol0u637go5LEK275yRYfHDWGq JOKB8iwqY0YP4d8P4bcMdrVQbAScRfDMW+XT6OpcHRzlRmWpHnSA5owDFrsAfX5XzeG 2PCk/fyaj+09wYcF6i81eqN1QW1xhB74sPyr32vo=
Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1649243184582508.4892121689095; Wed, 6 Apr 2022 04:06:24 -0700 (PDT)
Received: from [65.117.211.248] by mail.zoho.com with HTTP;Wed, 6 Apr 2022 04:06:24 -0700 (PDT)
Date: Wed, 06 Apr 2022 04:06:24 -0700
From: Eric J Bowman <mellowmutt@zoho.com>
To: Austin 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: <17ffe8ddd90.1257859fc38181.7721145847915462132@zoho.com>
In-Reply-To: <904B5382-ADCA-461F-B47C-583874D4FB55@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>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_95339_871100503.1649243184529"
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 1nc3Um-0008I6-OM 9b442045070e32c6ab8ef87541bb3142
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Draft for Resumable Uploads
Archived-At: <https://www.w3.org/mid/17ffe8ddd90.1257859fc38181.7721145847915462132@zoho.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/39973
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>

>

> So then I think a simple modification of my “Partial Uploads”

> document (https://tools.ietf.org/id/draft-wright-http-partial-upload-01.html) would work 

> well.

>



Kudos for how well you've written your document. But please don't suggest using PATCH to create a resource? Best decision I ever made regarding httpd coding was only 3 years or so ago, I eschewed Windows compatibility in favor of tight coupling to UNIX filesystem attributes. Speaking in terms of static files for simplicity...



DELETE on my httpd doesn't remove the existing resource, it sets it to zero bytes, such that subsequent GET/HEAD requests respond 410, and may or may not Allow: PATCH. No file? 404, which may Allow: PUT. I can't help but think that a PATCH request to a nonexistent resource should return 404.



>

> First, it defines the message/byterange media type, 

> for making changes to a specific byte range. This is the 

> bulk of the desired functionality, I think.

>



I would encourage you to document that media type independently from the rest of your draft.


>

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

Second, 2__ Sparse Resource would indicate that the resource has some regions filled in by the server, and might not be valid according to the media type definition. But I’m not confident that all user-agents would safely handle a 2__ Sparse Resource. If the resource represents executable code, the result could be very bad. Maybe I remove this? It seems wrong to me that a server could send back a document it knows is invalid according to the media type. Maybe there should be an error for clients that request a sparse resource without indicating they can support the response.

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

>



Hmmm... I'm a bit rusty at explaining this, but here goes. Media-Type in HTTP has nothing to do with file format. My server intent may be to "view source" of an HTML file, so I use text/plain to prevent it from being parsed and rendered as HTML. My server intent may be to present a broken PNG, so I use image/png to have the client attempt to render it as such. Being a valid representation of said media type is not implied, and I assure you there's nothing wrong with that. If a UA fails to render, it reports the error to the User i.e. "broken image icon". Application-layer error, not protocol-layer error.



I think you've gone astray by essentially modeling "sparse" as a subtype of any given media type. Or qualifying a resource ('s representation) as being the result of executable code -- excluding static files of expected types, 99% of my resources map to server-side processes. Receiving a borked representation has no effect on the executable, because the server-side resource coding is decoupled from its representations, and hidden behind a Uniform Interface.






-Eric