Re: Byte range PATCH

Martin Thomson <mt@lowentropy.net> Wed, 03 August 2022 22:50 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 60EDEC147930 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 3 Aug 2022 15:50:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.061
X-Spam-Level:
X-Spam-Status: No, score=-5.061 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, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-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=lowentropy.net header.b=XVnnE78T; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=JIlsvzBq
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 fiAYKDQQqjnn for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 3 Aug 2022 15:50:53 -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 BBD8EC14792A for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 3 Aug 2022 15:50:53 -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 1oJN9g-000P9e-NR for ietf-http-wg-dist@listhub.w3.org; Wed, 03 Aug 2022 22:47:56 +0000
Resent-Date: Wed, 03 Aug 2022 22:47:56 +0000
Resent-Message-Id: <E1oJN9g-000P9e-NR@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 <mt@lowentropy.net>) id 1oJN9f-000P8g-TZ for ietf-http-wg@listhub.w3.org; Wed, 03 Aug 2022 22:47:54 +0000
Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by mimas.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <mt@lowentropy.net>) id 1oJN9d-008FnP-65 for ietf-http-wg@w3.org; Wed, 03 Aug 2022 22:47:54 +0000
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 3FAA35C00C2 for <ietf-http-wg@w3.org>; Wed, 3 Aug 2022 18:47:42 -0400 (EDT)
Received: from imap41 ([10.202.2.91]) by compute3.internal (MEProxy); Wed, 03 Aug 2022 18:47:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1659566862; x= 1659653262; bh=xwkqxepV0kem9SmXgfd6ePfdIdcEJeAGL80jk6AWE3o=; b=X VnnE78TIVkPsh/5Obzvl4MDRLIe0vDeayU8ViI8AIL9HSb15dV2M5wHImi5Phaww EchHJHvLQ94S6erQVHSfsqV/iVwnmJzFJPttmRN/tHsP8i+2fThbfFVPKLNh9Sg0 gDxqMXKCvsZX9zyMqidIbdkBc2cQL4vymoxm2+YewmYqCmm0fObqbsfksVoJcDPi veqbi7Gx1btIZYsE0Rz/LjW80AjJJP8eAieJwMMSNLSgzsZPAQ2lyXtRgJ3LVvcs OEMkHNtZ+oXJfznzwAb2wsDhYuHJPoekv3Ta/j6anmQAl7TFPJgrFdyCqB8GOJ24 F0KITNxwk2GmJSaw2Yj8w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1659566862; x=1659653262; bh=x wkqxepV0kem9SmXgfd6ePfdIdcEJeAGL80jk6AWE3o=; b=JIlsvzBquI22Rabph h/8hXnH6Omg9d+qHlA7QDsN1thJdZYLmSzGY2xxl06rk+cp91rfNxAYhlYvSksFp orBkWU9GiMv8VdHNcwjjqs9ZTfDPzFO0b6b9HgDC3H2qHqWUrMsCCznADRWjDDE/ KYCWcu6ppy72xErJb/OS+fz17pTorUbuTrvvROSINRsfYjWrD9fsVWjir8EQTt0R HR5IXATBlNB8bbXzxrkRxeEwStEvoc/dSY729pcsWpd4A9UATHcpc5q96nQH71TN NGNM1tJV4HMqF5YIusKJUaBeNQ3XvF4wx7QHwXQ1REN4EyAFD9YacJRma3FwgoyO FpTHw==
X-ME-Sender: <xms:DvvqYi2_d3OzXQ3DUZI6wk9oBFKcNPr61Sm4x_Yr4-_IduDA11im1g> <xme:DvvqYlHwMEvbOzltR1zs4ZT9cU5piqvIZEaPx1UziA9yC8SparPsJ2b8N_sRt8ONn Dh_bXoOTL9RGy0Ebjs>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddvkedgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtgfesth hqredtreerjeenucfhrhhomhepfdforghrthhinhcuvfhhohhmshhonhdfuceomhhtsehl ohifvghnthhrohhphidrnhgvtheqnecuggftrfgrthhtvghrnhepgfejueduieffledtge elheejvdettdejudduhefggeefgfekgfeuieetgefftddtnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhtsehlohifvghnthhrohhphidrnh gvth
X-ME-Proxy: <xmx:DvvqYq5wy7tbmtEHyA7Wa6IAQarNd1lJEuPn8KkqGLy9iApk1hfuWg> <xmx:DvvqYj26JsZQrISq1cpjyWacC1Ul5nk9nvTERwH6vryRScdOt63WaQ> <xmx:DvvqYlHeT_znUxbIlLnnSI6mixH-YJrW1KA00KkiPVvWt2dbkFFdog> <xmx:DvvqYpQC_mKyDNturl-ELZKm17uw7QdpT4Xg22IBp1DE8mnamlFnAg>
Feedback-ID: ic129442d:Fastmail
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 142BE2340077; Wed, 3 Aug 2022 18:47:42 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.7.0-alpha0-758-ge0d20a54e1-fm-20220729.001-ge0d20a54
Mime-Version: 1.0
Message-Id: <cf9acb50-a8d9-4461-b1e5-26b8de3ce0c8@beta.fastmail.com>
In-Reply-To: <4A878809-DDC3-4EBE-828E-99B4EE96147A@bzfx.net>
References: <E511F4BD-B422-46DA-8409-EBBD684098A6@bzfx.net> <41c96787-7330-e9e0-da59-68c6dd197c58@gmx.de> <98341B31-B3A9-46C9-B755-8265CC478664@bzfx.net> <b9e046ac-4c0b-43b6-b291-8725b18de35a@beta.fastmail.com> <4A878809-DDC3-4EBE-828E-99B4EE96147A@bzfx.net>
Date: Thu, 04 Aug 2022 08:47:22 +1000
From: Martin Thomson <mt@lowentropy.net>
To: ietf-http-wg@w3.org
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=66.111.4.29; envelope-from=mt@lowentropy.net; helo=out5-smtp.messagingengine.com
X-W3C-Hub-DKIM-Status: validation passed: (address=mt@lowentropy.net domain=lowentropy.net), signature is good
X-W3C-Hub-DKIM-Status: validation passed: (address=mt@lowentropy.net domain=messagingengine.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-9.8
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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1oJN9d-008FnP-65 e60c0be984cd475549117559166432b1
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Byte range PATCH
Archived-At: <https://www.w3.org/mid/cf9acb50-a8d9-4461-b1e5-26b8de3ce0c8@beta.fastmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40299
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>

On Thu, Aug 4, 2022, at 08:23, Austin William Wright wrote:
> Content-Length: bytes 100-/*
>
> … which is not currently well-formed (the "last-pos" is missing). 
> However, maybe it should be. HTTP supports indefinite length responses 
> (since HTTP/1.1), which can stream forever. Except this is not possible 
> in partial content responses, and maybe it should be.

That, I think, points to Julian's solution.  Imagine that the content of the message is something like this:

1. (optionally) a declaration of the total length of the thing you are intending to update (not sure about this one, frankly; it might just be better to have a signal that says "this is the end of the resource" or even a flag for "the last byte of this message is the last byte of the resource")

2. one or more chunks of data each with:

  a. a starting offset (maybe relative to the end of the previous one, or a gap)
  b. some number of bytes, with a length prefix

Encoding that in a binary format is almost trivial.  And far easier to process than what you have described.