[vlc-devel] commit: No need to send Connection: close or Connection: Keep-Alive. ( Bill C Riemers )

git version control git at videolan.org
Tue Jun 17 22:30:30 CEST 2008


vlc | branch: master | Bill C Riemers <docbill at hartnell.local> | Tue Jun 17 16:16:22 2008 -0400| [4e497a21adba27e618095b7b3f2538e3adadd6fe]

No need to send Connection: close or Connection: Keep-Alive.

Signed-off-by: Rémi Denis-Courmont <rdenis at simphalempin.com>

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

 modules/access/http.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index f7a2995..a4bc00e 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -1193,17 +1193,6 @@ static int Request( access_t *p_access, int64_t i_tell )
     net_Printf( VLC_OBJECT(p_access), p_sys->fd, pvs, "Icy-MetaData: 1\r\n" );
 
 
-    if( p_sys->b_continuous )
-    {
-        net_Printf( VLC_OBJECT( p_access ), p_sys->fd, pvs,
-                    "Connection: Keep-Alive\r\n" );
-    }
-    else if( p_sys->i_version == 1 )
-    {
-        net_Printf( VLC_OBJECT( p_access ), p_sys->fd, pvs,
-                    "Connection: Close\r\n");
-    }
-
     if( net_Printf( VLC_OBJECT(p_access), p_sys->fd, pvs, "\r\n" ) < 0 )
     {
         msg_Err( p_access, "failed to send request" );
@@ -1456,6 +1445,9 @@ static int Request( access_t *p_access, int64_t i_tell )
 
         free( psz );
     }
+    if(p_sys->i_remaining == 0 && (p_access->info.i_size == -1 || p_access->info.i_size == i_tell)) {
+        Disconnect( p_access );
+    }
     return VLC_SUCCESS;
 
 error:




More information about the vlc-devel mailing list