Re: Byte range PATCH

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.

Received on Saturday, 6 August 2022 00:12:42 UTC