From nobody Sun Feb  5 07:47:41 2023
Return-Path: <darrel@tavis.ca>
X-Original-To: httpapi@ietfa.amsl.com
Delivered-To: httpapi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1])
 by ietfa.amsl.com (Postfix) with ESMTP id A94D2C14F74A
 for <httpapi@ietfa.amsl.com>; Sun,  5 Feb 2023 07:47:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.897
X-Spam-Level: 
X-Spam-Status: No, score=-6.897 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5,
 RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-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 (1024-bit key)
 header.d=tavisdev.onmicrosoft.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 R2SqthoSH99f for <httpapi@ietfa.amsl.com>;
 Sun,  5 Feb 2023 07:47:36 -0800 (PST)
Received: from NAM12-DM6-obe.outbound.protection.outlook.com
 (mail-dm6nam12on2060d.outbound.protection.outlook.com
 [IPv6:2a01:111:f400:fe59::60d])
 (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 70173C14E514
 for <httpapi@ietf.org>; Sun,  5 Feb 2023 07:47:35 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=Ziluf/Y5D1Hy4aBe3S2Sfnx7KnDqak+iZ3HdyyCLbogGyELsoCEIwH0b5Ndd0nhYTLgaeQ37qt58BMuOMGxadA7hDPu+r4ryLtI0OeNn8isWzwPXtfQEM4VKeTS8m2IS8Vd3OeWUGpNIlapOJbY8SCAMiRP1J8T+z3sPFHxPSiEWDCqM6PeDVx57MIt9G/BObkeswDisryjrfaIj/xsBmPSqhlIGFI+GYUp+x575AZFT7SXiSHbjpmWzpgBekCl0+4jhGJfW1ZizaN23GxmXbyJAaMIBIu3e7gXpLEhZ57o6p8ZQ/p7Jx9jYh2BlZKHs+j3GgAQqe4S1jph/eHsdCQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=Ud2jQOz3J3Dcr0uIBP43LQUElJrl2Dax3rY2708/axI=;
 b=WbZizqgoDdiQBfsvl3Uo5WhocitnFLQy7mPPAzjatCfrvdN1SrlGCwdFdbeVBR2kPHRqhsD/cSndX8ChQ/o6DjsUBbC3pBFY3VhQf5/UbiPw8rZgF2Fa+t0kAqNY7fZlEFrJhU0YK4VMtv00p/xa6eIm6YZWxWoEGppryDkXa1RMBLku/w334gvfDfQJ5t4wPHHpdOrVlh1KIhaFU37FibdGIup0o661P4x2Qy1HU/FUq92HpW4bR8ejfVGB8Bbx872Ib3HusvcU01Hp6zfzjhLC5i825v+yVQor3fIfNq+asSPd5wLNO+xiLfnIqdXzDRlFXRlZ4U9hyV3fr/jeqg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=tavis.ca; dmarc=pass action=none header.from=tavis.ca;
 dkim=pass header.d=tavis.ca; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=tavisdev.onmicrosoft.com; s=selector2-tavisdev-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=Ud2jQOz3J3Dcr0uIBP43LQUElJrl2Dax3rY2708/axI=;
 b=XfQ+nU+/foODpQKs0aK5es872Tv5wsAnp0vrANWenaefyQ5c/KzXTtgXiyZ3cGruxduVpICUGQapp2Oxhqjs5crffY3/nCuchnZk9D7S+D3THTk+LY6zelK9U4woSXDPcWC6yqIH7XmJSWY8u/EjjK8QAKMY7ufD5YjfjC2m2DY=
Received: from DM6PR01MB5964.prod.exchangelabs.com (2603:10b6:5:202::33) by
 BL0PR01MB4993.prod.exchangelabs.com (2603:10b6:208:69::28) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.6064.29; Sun, 5 Feb 2023 15:47:31 +0000
Received: from DM6PR01MB5964.prod.exchangelabs.com
 ([fe80::46f:6683:2a0a:bcb0]) by DM6PR01MB5964.prod.exchangelabs.com
 ([fe80::46f:6683:2a0a:bcb0%4]) with mapi id 15.20.6064.032; Sun, 5 Feb 2023
 15:47:31 +0000
From: Darrel Miller <darrel@tavis.ca>
To: Austin William Wright <aaa@bzfx.net>, HTTP APIs Working Group
 <httpapi@ietf.org>
Thread-Topic: [httpapi] Byte range PATCH
Thread-Index: AQHZL2+nQVHMBSrY3ES1dJcfEBp/xq7AinNm
Date: Sun, 5 Feb 2023 15:47:31 +0000
Message-ID: <DM6PR01MB59643D37BCB22B0EC5863253A3D59@DM6PR01MB5964.prod.exchangelabs.com>
References: <4589CE6D-6C89-4450-AF7A-BC7F5659F3FA@bzfx.net>
In-Reply-To: <4589CE6D-6C89-4450-AF7A-BC7F5659F3FA@bzfx.net>
Accept-Language: en-US
Content-Language: en-CA
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: dkim=none (message not signed)
 header.d=none;dmarc=none action=none header.from=tavis.ca;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: DM6PR01MB5964:EE_|BL0PR01MB4993:EE_
x-ms-office365-filtering-correlation-id: 92f3f526-4728-4767-42d9-08db07904ac7
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: yQOeW1y/w6C1GpTMdi4i/z8ZsJN99SEJbJEmjzaD9n3xCCVColpHDdUYu5WZRhfcxS0O9sJfK6NCo50GdGV87oDTEncgVav5O1DkSA87drbC9nKoYD1L5IfP+kB39ZTTx9Nxsyg91Vmh1vj+BToG77kEmf+dbPGuUK6AHz+rZoAKKHNCP/2tN04T9/Y6brx58v8jfo7AeAjD/zNj4lFGbxFWGq4T8fOKBDzSMA/lTY7oFwjUhpBsHez4Ga/rX6bgm4/AvQVULvDIaq8gXOkjPBNVZPlmhLMUewCNy1NcyDCCyloFvE9G/Xt+xcqZcKgpLLzhpgg0kJhvPoiEfCNcs3vpRBn27iV2bufWxhbnxmykDxGyZliIjJASwlfGTbdUrLbqmTM5lgxCPsWdc46bbtuOzLh3+tTZiu1uXQhMuXqp+yCeqdeoYLt52B4IjE+niKwG58/N/Bs0rxy6GwFurEC5nbggW4++Vb+oWaxalJCilWzYGml+CjuyuQ2YkZc6o81zVS3ociOZ3lYDohCqu1+Jz3qDvv6vVlnvcFgrKxtXsndRtN8AuytlQdyhcnX+xmhJMHuQWGaFGp2VSvToQ+hAMhCAcOpDYqFOwegnn3M4sED8XfgTygNjLHJZY3NmEE8kKBICJJ50NSWyz7dD+Na8lwaWtFhEKz0oXSN4Hv8Vq+j8CicqoQEWYi2+rn5vxRng5NHdiYkQ28LwIXDb6s812EcaBFOpYhJ9NYAVOBg=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; 
 IPV:NLI; SFV:NSPM;
 H:DM6PR01MB5964.prod.exchangelabs.com; PTR:; CAT:NONE; 
 SFS:(13230025)(366004)(396003)(346002)(39830400003)(376002)(136003)(451199018)(41300700001)(7696005)(966005)(52536014)(53546011)(122000001)(6506007)(33656002)(8936002)(5660300002)(26005)(21615005)(38070700005)(38100700002)(9686003)(55016003)(186003)(478600001)(316002)(166002)(2906002)(71200400001)(83380400001)(91956017)(86362001)(66446008)(66556008)(66476007)(64756008)(8676002)(110136005)(76116006)(66946007);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?0HTIKzHTtdQ97KTg+hcSAVN0fmP0nPO0lAIQzqY/ziv+ab34puiSj9UL?=
 =?Windows-1252?Q?FUBcHmFC6Fzqs/lR18l1p5Fww+HLr+Rdf1fQJORIrfJPqoDTujCT/14v?=
 =?Windows-1252?Q?XUCfk+yW4ysM6F+YxGvue7BDigAVKOca/EPW9f4lM8ic5i/Rgt/BiWFV?=
 =?Windows-1252?Q?cCAPl+0GzkVZWK+pR+pCX9gQ675Okz93Ey1dBv8D5U+/Xx44OA0p3f4F?=
 =?Windows-1252?Q?XYeYCJemo/ODctIZQLkb6WxizGjHxHMKJtPRHPi9RsKc1ofU5roFwoyS?=
 =?Windows-1252?Q?PMDg/lQoAAqf8aK6hHMA6+pIjdifmdVUUlzqagwp5AGBrhPooFFFPStg?=
 =?Windows-1252?Q?EKXRbuwxcg8oVhLMqzRQJPxv01qQKQB0ZwVMucLUh5/5bljGB2PTwYTz?=
 =?Windows-1252?Q?uWFvKv2SC0O6FsuqSNEc1WYy8K5NNrih8xgSWhTDZps8IJpJJlw+Fqvb?=
 =?Windows-1252?Q?9oCxlrf3LNG2O5GLBr3WTADmlkY+Zf3KSY2/eYV4V9FiRIiLTFIsbBgx?=
 =?Windows-1252?Q?TLMCadim9timj8SdyUzXASJdPBn/csat48r1ZxmezIWIoc1wp9PMRlrC?=
 =?Windows-1252?Q?yxD6xt+PKFl45WAGTH/wtYkGu1yR7CizZHOtJiLB5XTTq5RG+IWES+Ft?=
 =?Windows-1252?Q?CigNahXLLa/9TnVdlHUamjtHTc+AyXZhUGy20jdHP0Mhb8FnYEBQpc2J?=
 =?Windows-1252?Q?yFdzGr+d9/ZnZpFU5GVxPDgOU0rknboTGCnP4+64/O6GqDG9bwQwRuSU?=
 =?Windows-1252?Q?La9LwiPtssSMiFaagZ3ULnvIKSQB5qPC88IKYzkVHkr+LN/8tl8tIkZc?=
 =?Windows-1252?Q?FhqPz7cuizlJIwxhXxzkObyMG+fGorNx92QspX9NuJt5vHYaY7wr8Isu?=
 =?Windows-1252?Q?DK+cCrCean51uPAxvFUsvhC7HFJJbPyjbCn20trikxqrlP/WvUWNVEh1?=
 =?Windows-1252?Q?0gaNmSomLyfOH7u0DRi6SAd5rIzlaUO+n8rahgMX7+7GQgRp4NRvvcgY?=
 =?Windows-1252?Q?f73YGFr2XHOG/SYVmaJt17j37sXz5oHeW/Y2XkWGkaPKTSbTeUx2rDVO?=
 =?Windows-1252?Q?5Xm08/g5iCYrL6+nxyclPd3pdQh1wahxWNP+8Uo1aKZGKWjKBqYA8pJn?=
 =?Windows-1252?Q?d9Hwub60ABSsEAAeKuEPguIHv5VCiHNjzHdqKx4rAtErCYy/IIJSjmw0?=
 =?Windows-1252?Q?87CvGIWkZX5TwQe8wziRMlDhOo7vnxqgAlpizEXMSA3Rb+Pk1RYNLD88?=
 =?Windows-1252?Q?t1T4vqoGk+ZWtThb3Ft/kRb5pYMH/UUofKBXIV8COqPofrOZsYDFVuXU?=
 =?Windows-1252?Q?DfHng4CWptUMyzhNdBW/JYDgdy4NQQ12dBTX3uOAktM7VFDRLQAdpBhm?=
 =?Windows-1252?Q?0CIUFRutm7rIVXGgzuoAeKZhsVXBCn1Of57jgE3IgeJEgversAsVeIIg?=
 =?Windows-1252?Q?daSqEvxpMJd4+/Y3WV9NkT55MeH0qJUeh8huyTi1SPtuzkTZ4ToXCVZi?=
 =?Windows-1252?Q?RNj2wTazhPaSj/PcYBolveji+d1wmvo4Ux2xZ/y/9LNJ9PNLiM84l7C2?=
 =?Windows-1252?Q?2e7ZXWlflPJzO/J4oxg4ZBlREJvc1DGJrFWeqIqS/hLiPN/FOTHyYMWD?=
 =?Windows-1252?Q?YwYWpK908Ry0cAlZRmpYvSTXQDBJFHlOSPYIQ4xuOW5UX0zTYZl6YNg5?=
 =?Windows-1252?Q?xh+jibhv4hpd5+20AD5Pnpq6IpeSegkIInoGBMqcN1MdlLOhA14Meg?=
 =?Windows-1252?Q?=3D=3D?=
Content-Type: multipart/alternative;
 boundary="_000_DM6PR01MB59643D37BCB22B0EC5863253A3D59DM6PR01MB5964prod_"
MIME-Version: 1.0
X-OriginatorOrg: tavis.ca
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM6PR01MB5964.prod.exchangelabs.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 92f3f526-4728-4767-42d9-08db07904ac7
X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Feb 2023 15:47:31.4002 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 8cea02ec-9788-4bac-a19b-3e782a3e9bb0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: Vz6TUzCpxXTL3san1d3NJAwlmPRCq08a1qhMCQ2HQCbRsNpa+JM9JiA5dv+ftIP7
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR01MB4993
Archived-At: <https://mailarchive.ietf.org/arch/msg/httpapi/KkFNbqBpjoLUHPDfeft-4ejlBWc>
Subject: Re: [httpapi] Byte range PATCH
X-BeenThere: httpapi@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Building Blocks for HTTP APIs <httpapi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/httpapi>,
 <mailto:httpapi-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/httpapi/>
List-Post: <mailto:httpapi@ietf.org>
List-Help: <mailto:httpapi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/httpapi>,
 <mailto:httpapi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Feb 2023 15:47:40 -0000

--_000_DM6PR01MB59643D37BCB22B0EC5863253A3D59DM6PR01MB5964prod_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Austin,

Thank you for sharing your proposal.  It is definitely the case that API pr=
oviders do need this ability to perform partial updates to a resource.

However, it was my assumption that the updates to RFC 9110 that explicitly =
call out the potential for doing partial PUT https://www.rfc-editor.org/rfc=
/rfc9110.html#name-partial-put using the Content-Range header was the ackno=
wledgement that this is what folks are doing and its ok to do it.

There are several assertions in your draft that suggest you don=92t agree w=
ith this.

=93this technique cannot generally be used in PUT, because the server may i=
gnore the Content-Range header=94

=93However, if an upload is interrupted, no mechanism exists to upload only=
 the remaining data; the entire request must be retried.=94

=93Although the Content-Range field cannot be used in the request headers w=
ithout risking data corruption...=94

In section 14.5 there is guidance that a server SHOULD respond with a 400 i=
f Content-Range is received but not supported.  If this were a MUST, would =
that mitigate the concerns you raised?

Regarding your proposal, I do think there is value to being able to provide=
 multiple parts to the content of the PATCH request.  I could imagine certa=
in sync scenarios where that would be an efficient way of  communicating ch=
anges.

I=92m not sure I understand the value of having a Content-Type as part of t=
he header. I would have thought that patching would happen assuming the tar=
get is effectively application/octet-stream.  It would seem problematic to =
suggest doing a byte range update to a content-type that is text/plain when=
 the charset is either not known or unspecified.  I don=92t see how any kin=
d of media type semantics would impact how the patch is performed.  I am on=
ly considering the case where range units are bytes.

My only other thought here is, are we reinventing things like VCDIFF https:=
//www.rfc-editor.org/rfc/rfc3284 at this point?

Darrel


From: Austin William Wright<mailto:aaa@bzfx.net>
Sent: January 23, 2023 4:14 PM
To: HTTP APIs Working Group<mailto:httpapi@ietf.org>
Subject: [httpapi] Byte range PATCH

Hello HTTP APIs,

I=92m seeking to standardize a media type for writing to particular byte of=
fsets in a target document. This seems to be a common problem in HTTP appli=
cations, including in my own work with streaming parsers.

This sort of operation is common in filesystems. For example, you append au=
dio data to a .wav file, and then you update the header at the start of the=
 file. I don=92t know of any way to do this operation over HTTP, except a P=
UT that replaces the entire resource.

This has been discussed in the HTTP WG list, as part of =93resumable upload=
s=94<https://httpwg.org/http-extensions/draft-ietf-httpbis-resumable-upload=
.html>, and I emailed there some months ago about this I-D. But aside from =
the resumable uploads being in HTTP WG, this seems more like an API-related=
 feature.

Here=92s the I-D I=92ve written: draft-wright-http-patch-byterange-01<https=
://www.ietf.org/archive/id/draft-wright-http-patch-byterange-01.html>

Editor=92s copy: https://awwright.github.io/http-progress/draft-wright-http=
-patch-byterange.html

This is the successor to version 00; in response to some feedback, I added =
a binary format. And I discuss what is necessary to support =93splicing=94 =
(an insertion that shifts other content around) and indeterminate-length up=
loads, which is a requested feature for the =93resumable uploads=94 spec.

Is HTTP APIs the best place to pursue this? I=92m hoping I can discuss this=
 at IETF 116.

Thanks,

Austin Wright.


--_000_DM6PR01MB59643D37BCB22B0EC5863253A3D59DM6PR01MB5964prod_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc=
hemas-microsoft-com:office:word" xmlns:m=3D"http://schemas.microsoft.com/of=
fice/2004/12/omml" xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
252">
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:"Noto Sans";
	panose-1:2 11 5 2 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
/* List Definitions */
@list l0
	{mso-list-id:1335648921;
	mso-list-type:hybrid;
	mso-list-template-ids:-1616117334 -1 134807555 134807557 134807553 1348075=
55 134807557 134807553 134807555 134807557;}
@list l0:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:\F0D8;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;
	mso-fareast-font-family:"Times New Roman";
	mso-bidi-font-family:"Times New Roman";}
@list l0:level2
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l0:level3
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l0:level4
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l0:level5
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l0:level6
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l0:level7
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l0:level8
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l0:level9
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
--></style>
</head>
<body lang=3D"EN-CA" link=3D"blue" vlink=3D"#954F72" style=3D"word-wrap:bre=
ak-word">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">Austin,</p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Thank you for sharing your proposal.&nbsp; It is def=
initely the case that API providers do need this ability to perform partial=
 updates to a resource.</p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">However, it was my assumption that the updates to RF=
C 9110 that explicitly call out the potential for doing partial PUT
<a href=3D"https://www.rfc-editor.org/rfc/rfc9110.html#name-partial-put">ht=
tps://www.rfc-editor.org/rfc/rfc9110.html#name-partial-put</a> using the Co=
ntent-Range header was the acknowledgement that this is what folks are doin=
g and its ok to do it.</p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">There are several assertions in your draft that sugg=
est you don=92t agree with this.</p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">=93<span style=3D"font-size:10.5pt;font-family:&quot=
;Noto Sans&quot;,sans-serif;color:#222222;background:white">this technique =
cannot generally be used in PUT, because the server may ignore the Content-=
Range header</span>=94</p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.5pt;font-family:&quot;No=
to Sans&quot;,sans-serif;color:#222222;background:white">=93However, if an =
upload is interrupted, no mechanism exists to upload only the remaining dat=
a; the entire request must be retried.=94<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.5pt;font-family:&quot;No=
to Sans&quot;,sans-serif;color:#222222;background:white"><o:p>&nbsp;</o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.5pt;font-family:&quot;No=
to Sans&quot;,sans-serif;color:#222222;background:white">=93Although the Co=
ntent-Range field cannot be used in the request headers without risking dat=
a corruption...=94<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.5pt;font-family:&quot;No=
to Sans&quot;,sans-serif;color:#222222;background:white"><o:p>&nbsp;</o:p><=
/span></p>
<p class=3D"MsoNormal">In section 14.5 there is guidance that a server SHOU=
LD respond with a 400 if Content-Range is received but not supported.&nbsp;=
 If this were a MUST, would that mitigate the concerns you raised?</p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Regarding your proposal, I do think there is value t=
o being able to provide multiple parts to the content of the PATCH request.=
&nbsp; I could imagine certain sync scenarios where that would be an effici=
ent way of &nbsp;communicating changes.</p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">I=92m not sure I understand the value of having a Co=
ntent-Type as part of the header. I would have thought that patching would =
happen assuming the target is effectively application/octet-stream.&nbsp; I=
t would seem problematic to suggest doing
 a byte range update to a content-type that is text/plain when the charset =
is either not known or unspecified.&nbsp; I don=92t see how any kind of med=
ia type semantics would impact how the patch is performed.&nbsp; I am only =
considering the case where range units are bytes.</p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">My only other thought here is, are we reinventing th=
ings like VCDIFF
<a href=3D"https://www.rfc-editor.org/rfc/rfc3284">https://www.rfc-editor.o=
rg/rfc/rfc3284</a> at this point?</p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Darrel</p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<div style=3D"mso-element:para-border-div;border:none;border-top:solid #E1E=
1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class=3D"MsoNormal" style=3D"border:none;padding:0cm"><b>From: </b><a hr=
ef=3D"mailto:aaa@bzfx.net">Austin William Wright</a><br>
<b>Sent: </b>January 23, 2023 4:14 PM<br>
<b>To: </b><a href=3D"mailto:httpapi@ietf.org">HTTP APIs Working Group</a><=
br>
<b>Subject: </b>[httpapi] Byte range PATCH</p>
</div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Hello HTTP APIs,<o:p></o:p></p>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">I=92m seeking to standardize a media type for writin=
g to particular byte offsets in a target document. This seems to be a commo=
n problem in HTTP applications, including in my own work with streaming par=
sers.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">This sort of operation is common in filesystems. For=
 example, you append audio data to a .wav file, and then you update the hea=
der at the start of the file. I don=92t know of any way to do this operatio=
n over HTTP, except a PUT that replaces
 the entire resource.<o:p></o:p></p>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">This has been discussed in the HTTP WG list, as part=
 of <a href=3D"https://httpwg.org/http-extensions/draft-ietf-httpbis-resuma=
ble-upload.html">
=93resumable uploads=94</a>,&nbsp;and I emailed there some months ago about=
 this I-D. But aside from the resumable uploads being in HTTP WG, this seem=
s more like an API-related feature.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Here=92s the I-D I=92ve written:&nbsp;<a href=3D"htt=
ps://www.ietf.org/archive/id/draft-wright-http-patch-byterange-01.html">dra=
ft-wright-http-patch-byterange-01</a><o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Editor=92s copy:&nbsp;<a href=3D"https://awwright.gi=
thub.io/http-progress/draft-wright-http-patch-byterange.html">https://awwri=
ght.github.io/http-progress/draft-wright-http-patch-byterange.html</a><o:p>=
</o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">This is the successor to version 00; in response to =
some feedback, I added a binary format. And I discuss what is necessary to =
support =93splicing=94 (an insertion that shifts other content around) and&=
nbsp;indeterminate-length uploads, which is
 a requested feature for the =93resumable uploads=94 spec.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Is HTTP APIs the best place to pursue this? I=92m ho=
ping I can discuss this at IETF 116.<o:p></o:p></p>
</div>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class=3D"MsoNormal">Austin Wright.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>

--_000_DM6PR01MB59643D37BCB22B0EC5863253A3D59DM6PR01MB5964prod_--

