FW: Content-* Semantics [i103]

Frank Ellermann wrote:
> Brian Smith wrote:
>  
> > headers like Content-MD5 (recalculate MD5 if you
> encode/decode using
> > Content-Encoding)
> [...]
> > need special processing when you "regurgitate" them.
> 
> What "special processing" apart from what is stated in RFC
> 1864 do you have in mind ?
> 
> | To generate the value of the Content-MD5 field, the MD5
> algorithm is
> | computed on the canonical form of the MIME entity's object.  In 
> | particular, this means that the sender applies the MD5 algorithm on 
> | the data immediately after conversion to canonical form, before 
> | applying any content-transfer-encoding, and that the receiver also 
> | applies the MD5 algorithm on the canonical form, after undoing any 
> | content-transfer-encoding.

There is no content-transfer-encoding in HTTP, and
Content-MD5/Content-Encoding processing works exactly the opposite way:
if the request is compressed, you need to calculate the MD5 on the
compressed request; if you later serve the uncompressed variant, then
you need to recalculate the Content-MD5 or remove it. That is the
"special processing" that I was referring to.

- Brian

Received on Friday, 29 February 2008 00:25:52 UTC