Re: IPP>PRO - http comments

 --->> It would be good to get a definitive answer as to whether
>> Content-Length takes priority over the boundary string in a
>> multipart/*.  At a recent IETF meeting I asked such a question to
some
>> knowledgeable person who said that Content-Length was ignored in
this
>> context and that the boundary string was the only way to determine
the
>> end of a part in a multipart/*. I would prefer that Content-Length
>> take priority if it is present.
>
>My take:
>
>It is illegal to send content where the content-length and the
boundary
>string disagree. So one doesn't take priority over the other. A
>recipient
>should signal an error if it detects that they are different.

I agree with the first part but not the second.

If you see a content length the obvious thing to do is to avoid the
computationaly intensive check of each byte (yes O(1) is less than
anything Boyer-Moore can do and that is not subjective). You
hop straight to the boundary.

If you see a boundary marker ther, then its OK other wise you signal
an error.

Note that if there are additional boundaries within the content length
delimited block you don't see them. 

So content length should take priority but you may in some cases be 
able to detect an error.

>Senders that are at all uncertain about the length of the data should
>omit content-length and rely on the boundary alone.

Yep

Phill.

Received on Thursday, 1 May 1997 09:20:37 UTC