From a735127f42a2d108b8a26aa0594c2e0365b53935 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Fri, 20 Jun 2008 11:52:44 +0300 Subject: [PATCH] Revert "No need to send Connection: close or Connection: Keep-Alive." This reverts commit 4e497a21adba27e618095b7b3f2538e3adadd6fe. --- modules/access/http.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/access/http.c b/modules/access/http.c index a4bc00e323..f7a2995d5a 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -1193,6 +1193,17 @@ 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" ); @@ -1445,9 +1456,6 @@ 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: -- 2.39.2