[vlc-commits] http: remove bogus persistent connection support
Rémi Denis-Courmont
git at videolan.org
Thu Dec 17 21:14:16 CET 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Dec 17 21:45:47 2015 +0200| [5e2f165dc6f496206535c96fc2fa630a7111fecc] | committer: Rémi Denis-Courmont
http: remove bogus persistent connection support
This became dead code with b0247e59d5b2b3556f44295f6276a00d222f9277 and
ostensibly did not work properly before that.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5e2f165dc6f496206535c96fc2fa630a7111fecc
---
modules/access/http.c | 24 +++---------------------
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/modules/access/http.c b/modules/access/http.c
index 2d4acdd..acea900 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -184,7 +184,6 @@ struct access_sys_t
bool b_reconnect;
bool b_continuous;
bool b_pace_control;
- bool b_persist;
bool b_has_size;
};
@@ -252,7 +251,6 @@ static int Open( vlc_object_t *p_this )
p_sys->psz_icy_genre = NULL;
p_sys->psz_icy_title = NULL;
p_sys->i_remaining = 0;
- p_sys->b_persist = false;
p_sys->b_has_size = false;
p_sys->offset = 0;
p_sys->size = 0;
@@ -963,7 +961,6 @@ static int Connect( access_t *p_access, uint64_t i_tell )
p_sys->psz_icy_genre = NULL;
p_sys->psz_icy_title = NULL;
p_sys->i_remaining = 0;
- p_sys->b_persist = false;
p_sys->b_has_size = false;
p_sys->offset = i_tell;
p_sys->size = 0;
@@ -1065,7 +1062,6 @@ static int Request( access_t *p_access, uint64_t i_tell )
{
access_sys_t *p_sys = p_access->p_sys;
char *psz ;
- p_sys->b_persist = false;
p_sys->i_remaining = 0;
@@ -1094,10 +1090,10 @@ static int Request( access_t *p_access, uint64_t i_tell )
if (p_sys->psz_referrer)
WriteHeaders( p_access, "Referer: %s\r\n", p_sys->psz_referrer );
/* Offset */
- if( p_sys->i_version == 1 && ! p_sys->b_continuous )
+ if( p_sys->i_version == 1 )
{
- p_sys->b_persist = true;
- WriteHeaders( p_access, "Range: bytes=%"PRIu64"-\r\n", i_tell );
+ if( !p_sys->b_continuous )
+ WriteHeaders( p_access, "Range: bytes=%"PRIu64"-\r\n", i_tell );
WriteHeaders( p_access, "Connection: close\r\n" );
}
@@ -1259,14 +1255,6 @@ static int Request( access_t *p_access, uint64_t i_tell )
i_nsize, i_ntell, p_sys->i_remaining);
}
}
- else if( !strcasecmp( psz, "Connection" ) ) {
- msg_Dbg( p_access, "Connection: %s",p );
- int i = -1;
- sscanf(p, "close%n",&i);
- if( i >= 0 ) {
- p_sys->b_persist = false;
- }
- }
else if( !strcasecmp( psz, "Location" ) )
{
char * psz_new_loc;
@@ -1455,12 +1443,6 @@ static int Request( access_t *p_access, uint64_t i_tell )
free( psz );
}
- /* We close the stream for zero length data, unless of course the
- * server has already promised to do this for us.
- */
- if( p_sys->b_has_size && p_sys->i_remaining == 0 && p_sys->b_persist ) {
- Disconnect( p_access );
- }
return VLC_SUCCESS;
error:
More information about the vlc-commits
mailing list