Re: Content-MD5 and partial responses

On Mon, 29 Jun 2009, Mark Nottingham wrote:

> a) C-MD5 applies to the bytes in the entity-body (as above), and therefore we 
> need to specify what a cache does with it when it combines partial responses 
> (throw it away?).
>
> b) C-MD5 applies to the *full* response body, avoiding the combination 
> issues, and allowing clients to do a MIC of the full response (assuming they 
> have it), but removing the ability to do a MIC on a partial response on its 
> own.
>
> Anybody aware of C-MD5 being used with partial responses in the wild (I'm 
> looking at you, Adobe)?

A while back, I implemented option a) as it seemed to be the most logical 
interpretation of the spec.

HEAD /Distrib/jigsaw_2.2.6.zip HTTP/1.1
Host: jigsaw.w3.org

HTTP/1.1 200 OK
Content-Length: 9331520
Content-Md5: fBhlh9ttr14YAqe45Yi+xg==

------

GET /Distrib/jigsaw_2.2.6.zip HTTP/1.1
Host: jigsaw.w3.org
Range: bytes=0-1

HTTP/1.1 206 Partial Content
Content-Length: 2
Content-Md5: 1xvdIsi7k7jSh9zm9GrtJQ==
Content-Range: bytes 0-1/9331520

Caches should "throw away" the md5 (after verification of the partial body 
received, and it is up to the cache to recompute the md5 sum of the bytes 
served.

-- 
Baroula que barouleras, au tiéu toujou t'entourneras.

         ~~Yves

Received on Tuesday, 30 June 2009 08:37:20 UTC