Commit 4e497a21 authored by Bill C Riemers's avatar Bill C Riemers Committed by Rémi Denis-Courmont

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

Signed-off-by: default avatarRémi Denis-Courmont <rdenis@simphalempin.com>
parent fe4423dd
...@@ -1193,17 +1193,6 @@ static int Request( access_t *p_access, int64_t i_tell ) ...@@ -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" ); 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 ) if( net_Printf( VLC_OBJECT(p_access), p_sys->fd, pvs, "\r\n" ) < 0 )
{ {
msg_Err( p_access, "failed to send request" ); msg_Err( p_access, "failed to send request" );
...@@ -1456,6 +1445,9 @@ static int Request( access_t *p_access, int64_t i_tell ) ...@@ -1456,6 +1445,9 @@ static int Request( access_t *p_access, int64_t i_tell )
free( psz ); 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; return VLC_SUCCESS;
error: error:
......
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