Partial Puts

1	Problem Description

Clients who make small changes to resources do not wish to have to
upload an entire entity. As such, some sort of partial write capability
is needed.

There are two types of partial writes, insertion writes and over writes.

2	Proposal

I propose that the range header be used with the write-type header to
specify that a partial PUT.

WriteType = "Write-Type" ":" 1#("INSERT" | "OVERWRITE" | Token) CRLF

The INSERT and OVERWRITE values must not be used together.

An INSERT indicates that the included entity should be inserted into the
location identified in the Range header, causing content already in the
resource to be moved forward.

An OVERWRITE indicates that the request body should overwrite whatever
exists in the range specified by the range header.

In both cases the Range header must only identify a single point. For
example, to specify that the request body should be inserted at byte 30
one would include "Range: bytes= 30-30".

An insertion at the beginning of a resource causes the entire resource
to be shifted forward to make room for the insertion. However an
insertion must not specify an entry point beyond the end of the
resource.

An over write may have a range that is just beyond the end of the
resource to indicate appending. In the case of bytes, the range should
specify exactly one byte beyond the end of the resource. 

If the content-type of the request body is multipart/byte-ranges then
the previous behavior may be generalized across the multipart entries.
The server may ignore any entry that does not have both a range and
write-type header. The response should indicate that a range was skipped
due to the lack of either or both headers.

The Write-Type header may only be used in conjunction with the Range
header.

In addition there are any number of resources where the use of range and
write-type make no sense. In such a case the resource should return a
412 Precondition Failed.

3	Discussion

Clearly having the Write-Type header dropped would be a very bad thing.
As such it is necessary to use a PEP extension in order to guarantee
that the server will not process the method if it does not understand
the write-type or range headers.

Received on Friday, 21 March 1997 00:56:16 UTC