[vlc-devel] commit: httpd: Fix keepalive/close of non-matching HTTP versions. ( Derk-Jan Hartman )

git version control git at videolan.org
Wed Sep 24 03:05:44 CEST 2008


vlc | branch: 0.9-bugfix | Derk-Jan Hartman <hartman at videolan.org> | Wed Sep 24 03:05:07 2008 +0200| [c0bd715acd16d199907e1b3444a061ef3316cca6] | committer: Derk-Jan 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
(cherry picked from commit 304a487848610a5bb10e0e0fdc14694729a85463)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c0bd715acd16d199907e1b3444a061ef3316cca6
---

 src/network/httpd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/network/httpd.c b/src/network/httpd.c
index 6106959..c9c6cc8 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -2351,8 +2351,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 ) )
                     {




More information about the vlc-devel mailing list