Re: ISSUE-4 (SpecContent): Should specifications decide what counts as content for transfer? [Progress Events]

* Jonas Sicking wrote:
>Is anyone ever going to be able to get any useful size data for the 
>headers anyway though? I.e. if we allow headers to be counted as part of 
>the size, is anyone ever going to be able to do that?
>
>To be able to do that you'd have to have some sort of out-of-band 
>metadata that travells parallel to the TCP/IP connection since the 
>TCP/IP connection is busy transferring HTTP which doesn't contain this 
>information.
>
>I guess you could use just the 'bytes downloaded so far' part just to 
>show that progress is made, but that would mix very strangly if you then 
>received a body which you did have a size for.

You do not know the length of the header while you are reading it, and
you may not know the length of the body while reading it. In both cases
you would signify that the length is not computable and only report the
amout that has been transferred so far. If the length of the body is
known, you would signify that after reading the header, and set total to
the length of the message (header + rest) that has been read so far. Do
note that e.g. with Transfer-Encoding:chunked you do not know the length
of the body until you finished reading it.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Monday, 23 June 2008 19:48:26 UTC