Semantics of Content-Range in the PUT method

I have a question about the intended operation of the Content-Range range
header in the PUT method. In section 14.17 the format is given as:

Content-Range: bytes first_byte-last_byte/length

Now, I assume that the indication of the first and last is where in the
specified entity, the new data should be stored. But, in this case, what does
the length indicate?  Generally, it means the total length of the requested
entity. But in this case, is it the length of the entity before the update is
applied or after? Furthermore, how can the client reliably know the length of
the target entity?  The client can get it with a HEAD method but it can't
guarantee that the length won't have changed by the time the PUT method is
processed. It seems to me that this field can no be reliably used so perhaps
the server is just supposed to ignore it.

In addition, if the insert position is given such that first_byte is beyond
the current end of file for the entity, what should the server do? Is this
an error or should the server simply append to the end of th file or should
the server seek to the given first position and before writing. In this last
case, there may be a large chunk of undefined data in the file which I guess
would just be NULLs.

I tried experimenting with the latest Jigsaw server to see what it does and
found that it simply ignore the Content-Range in the PUT method (which is
wrong according to sec. 9.6). So exactly what should be happening in this
case?

Gordon

Received on Thursday, 23 January 1997 08:40:10 UTC