Re: Byte range PATCH

Guoye Zhang <guoye_zhang@apple.com> Sat, 06 August 2022 00:15 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 EC0EDC15A73D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 5 Aug 2022 17:15:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.341
X-Spam-Level:
X-Spam-Status: No, score=-8.341 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.582, 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_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=apple.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cRB_c8ezSCkU for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 5 Aug 2022 17:15:29 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6201AC15A728 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 5 Aug 2022 17:15:29 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.94.2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1oK7Qp-0072TD-HB for ietf-http-wg-dist@listhub.w3.org; Sat, 06 Aug 2022 00:12:43 +0000
Resent-Date: Sat, 06 Aug 2022 00:12:43 +0000
Resent-Message-Id: <E1oK7Qp-0072TD-HB@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <guoye_zhang@apple.com>) id 1oK7Qp-0072SE-6y for ietf-http-wg@listhub.w3.org; Sat, 06 Aug 2022 00:12:42 +0000
Received: from ma1-aaemail-dr-lapp03.apple.com ([17.171.2.72]) by mimas.w3.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <guoye_zhang@apple.com>) id 1oK7Qm-009G3r-Jm for ietf-http-wg@w3.org; Sat, 06 Aug 2022 00:12:41 +0000
Received: from pps.filterd (ma1-aaemail-dr-lapp03.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp03.apple.com (8.16.0.42/8.16.0.42) with SMTP id 27605T3v031006; Fri, 5 Aug 2022 17:12:28 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=qGPzguHKnki03dvJusf5R1a+TjI6rnyXojvetFLsFAA=; b=WuRb4GqTDHHtPHcsr6/Jgzk86f5YCpoYn67gyohZW/P7HwKyimGLifb8luAIiW2B8UDB mxbvkM1Bwo0rikFNE/ibJgRnp5m/vu4p1Z/0OZqi0BMZXkSeiyYXVNPC8K4PKGJMuxis aCHiiga+M2chjgVuJJJvse+3XzXguD6yXXpQMa/QOIDD3yB4OjS+TJ93iaP2+ENuZdfZ +SyYJNr25taeMWj5LaRpH+lR6YYyk+OJMS132kn7XBk6a8JgAlAsHZFY7uidfCJh+DOM jH+noDi6r+XvDQD0dWM/fWOPtysrfti16A9OjI7LfLwZ3EshZjNVkPtAHW93u5adoX6I IA==
Received: from rn-mailsvcp-mta-lapp01.rno.apple.com (rn-mailsvcp-mta-lapp01.rno.apple.com [10.225.203.149]) by ma1-aaemail-dr-lapp03.apple.com with ESMTP id 3hn3mxpvr6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 05 Aug 2022 17:12:28 -0700
Received: from rn-mailsvcp-mmp-lapp04.rno.apple.com (rn-mailsvcp-mmp-lapp04.rno.apple.com [17.179.253.17]) by rn-mailsvcp-mta-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.18.20220407 64bit (built Apr 7 2022)) with ESMTPS id <0RG600NCY38RR2B0@rn-mailsvcp-mta-lapp01.rno.apple.com>; Fri, 05 Aug 2022 17:12:27 -0700 (PDT)
Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp04.rno.apple.com by rn-mailsvcp-mmp-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.18.20220407 64bit (built Apr 7 2022)) id <0RG600W0034U2S00@rn-mailsvcp-mmp-lapp04.rno.apple.com>; Fri, 05 Aug 2022 17:12:27 -0700 (PDT)
X-Va-A:
X-Va-T-CD: e1c62ae64077d0caba95a15956bd4788
X-Va-E-CD: 35b7e4051558f4c8efb3722a0bb0f060
X-Va-R-CD: f3a918f76ac1401728fa782f7a8bfb67
X-Va-CD: 0
X-Va-ID: a407918f-1fbd-418d-b733-b42b841bf1d5
X-V-A:
X-V-T-CD: e1c62ae64077d0caba95a15956bd4788
X-V-E-CD: 35b7e4051558f4c8efb3722a0bb0f060
X-V-R-CD: f3a918f76ac1401728fa782f7a8bfb67
X-V-CD: 0
X-V-ID: 8aee8daf-b849-4249-b41c-59519b58a624
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517,18.0.883 definitions=2022-08-05_12:2022-08-04,2022-08-05 signatures=0
Received: from smtpclient.apple (unknown [17.234.15.95]) by rn-mailsvcp-mmp-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.18.20220407 64bit (built Apr 7 2022)) with ESMTPSA id <0RG600X3138NXH00@rn-mailsvcp-mmp-lapp04.rno.apple.com>; Fri, 05 Aug 2022 17:12:27 -0700 (PDT)
From: Guoye Zhang <guoye_zhang@apple.com>
Message-id: <3A341B75-7088-4B8F-96CC-AB25CAC7D842@apple.com>
Content-type: multipart/alternative; boundary="Apple-Mail=_674149AC-702C-47B7-A67A-E18D529C965E"
MIME-version: 1.0 (Mac OS X Mail 16.0 \(3731.0.8.1.1\))
Date: Fri, 05 Aug 2022 17:12:13 -0700
In-reply-to: <E511F4BD-B422-46DA-8409-EBBD684098A6@bzfx.net>
Cc: ietf-http-wg@w3.org
To: Austin William Wright <aaa@bzfx.net>
References: <E511F4BD-B422-46DA-8409-EBBD684098A6@bzfx.net>
X-Mailer: Apple Mail (2.3731.0.8.1.1)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517,18.0.883 definitions=2022-08-05_12:2022-08-04,2022-08-05 signatures=0
Received-SPF: pass client-ip=17.171.2.72; envelope-from=guoye_zhang@apple.com; helo=ma1-aaemail-dr-lapp03.apple.com
X-W3C-Hub-DKIM-Status: validation passed: (address=guoye_zhang@apple.com domain=apple.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-7.0
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.573, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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 1oK7Qm-009G3r-Jm 7ee7a05be8b45201ea43c016d65cfca9
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Byte range PATCH
Archived-At: <https://www.w3.org/mid/3A341B75-7088-4B8F-96CC-AB25CAC7D842@apple.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40305
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>

Hi Austin,

Thanks for sharing the well-written draft. I’m glad this is being worked on. Two comments:

(1) As you have already noted, Content-Range forces us to declare an end offset, so it’s unfortunate that a continuous stream with undetermined length has to be sent using multipart encoding.

(2) For a general purpose byte range patching mechanism, would you also want to define ways to insert or delete byte ranges?

A possible approach is to have this be a “replace byte range with” operation instead:

Replace 0-0 with 100 bytes: insert 100 bytes at the front
Replace 0-100 with 0 bytes: remove first 100 bytes
Replace 100-100 with 100 bytes: insert 100 bytes at offset 100

Guoye

> On Aug 2, 2022, at 16:11, Austin William Wright <aaa@bzfx.net> wrote:
> 
> Hello HTTP WG,
> 
> I’m writing to pursue standardization of a PATCH media type to perform writes at specific offsets. This may be especially relevant to draft-tus-httpbis-resumable-uploads-protocol-02, if adopted. It can also serve as the foundation for other features, like segmented uploading, finishing indexes in video files, or other operations that require editing at specific positions in a file.
> 
> I wrote and published draft-wright-http-patch-byterange-00 <https://www.ietf.org/archive/id/draft-wright-http-patch-byterange-00.html> for your consideration. Please let me know your thoughts.
> 
> Thanks,
> 
> Austin.