[vlc-devel] [PATCH] No need to send Connection: Keep-Alive or Connection: Closed
Bill C. Riemers
briemers at redhat.com
Tue Jun 17 21:45:03 CEST 2008
Rémi Denis-Courmont wrote:
> Le mardi 17 juin 2008 21:05:02 Bill C. Riemers, vous avez écrit :
>> This replaces my previous patch not to send Connection: Closed. As
>> discussed, there is no need to send Connection: Keep-Alive either, as
>> this will just confuse HTTP 1.0 proxy servers.
> Once we stop sending Connection, the server MUST do at least one of:
> - specify the Content-Length,
> - use chunked encoding, or
> - set Connection: close in the response.
> This is so that we can detect the end of file. I am fine with assuming that
> the server will do this.
> But... I suspect the proposed patch will breaks if Content-Length is 0 (i.e.
> if we try to request from the end of the file), and neither Connection nor
> chunked encoding are used.
Lets see. There are two cases:
1. We send a byte range:
Reviewing rfc2616-sec14, I see there is no way to define a zero length
range. If the first byte
is beyond the last byte of the file, then the server is required to
respond 416 (Request Range not satisfiable).
2. We don't send a byte range:
In this case we are requesting the full file. So we will only get a 0
length Content-Length, if the file itself
is 0 size. In this case, indeed it looks like we get into and endless
loop requesting the same data over and
More information about the vlc-devel