Commit 304a4878 authored by hartman's avatar hartman

httpd: Fix keepalive/close of non-matching HTTP versions.

This is a suggestion by Forum user boing (http://forum.videolan.org/viewtopic.php?f=18&t=47295&p=162690#p162690)

Freebox implements a HTTP/1.0 client, we a HTTP/1.1 server. As such we should base our determination of the keepalive vs. close behaviour on the query (client request) instead of the answer (server response).

See also: http://www.ietf.org/rfc/rfc2145.txt
parent 97a8b0fb
......@@ -2352,8 +2352,8 @@ retry:
}
if( ( ( cl->query.i_proto == HTTPD_PROTO_HTTP ) &&
( ( cl->answer.i_version == 0 && b_keepalive ) ||
( cl->answer.i_version == 1 && !b_connection ) ) ) ||
( ( cl->query.i_version == 0 && b_keepalive ) ||
( cl->query.i_version == 1 && !b_connection ) ) ) ||
( ( cl->query.i_proto == HTTPD_PROTO_RTSP ) &&
!b_query && !b_connection ) )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment