[vlc-devel] commit: Revert "No need to send Connection: close or Connection: Keep-Alive ." ( Rémi Denis-Courmont )
git version control
git at videolan.org
Fri Jun 20 10:51:34 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Fri Jun 20 11:52:44 2008 +0300| [a735127f42a2d108b8a26aa0594c2e0365b53935]
Revert "No need to send Connection: close or Connection: Keep-Alive."
This reverts commit 4e497a21adba27e618095b7b3f2538e3adadd6fe.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a735127f42a2d108b8a26aa0594c2e0365b53935
---
modules/access/http.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/modules/access/http.c b/modules/access/http.c
index a4bc00e..f7a2995 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:
More information about the vlc-devel
mailing list