X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Fhttp.c;h=8485044568a22abfa872416538ddebbe0281b953;hb=dadb0622e6244456f7b5576ab2f9aa0c6582c683;hp=983fab7dac4ffe4c17c097c78fcc189a7948ca89;hpb=a7c0e2a065b845e9bdd7f00bb7bd8e86a93b5dbe;p=vlc diff --git a/modules/access/http.c b/modules/access/http.c index 983fab7dac..8485044568 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -123,9 +123,10 @@ vlc_module_begin () add_integer( "http-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, true ) change_safe() - add_string( "http-user-agent", PACKAGE_NAME"/"PACKAGE_VERSION, NULL, + add_string( "http-user-agent", NULL, NULL, AGENT_TEXT, AGENT_LONGTEXT, true ) change_safe() + change_need_restart() add_bool( "http-reconnect", false, NULL, RECONNECT_TEXT, RECONNECT_LONGTEXT, true ) add_bool( "http-continuous", false, NULL, CONTINUOUS_TEXT, @@ -141,11 +142,8 @@ vlc_module_begin () #endif add_obsolete_string("http-user") add_obsolete_string("http-pwd") - add_shortcut( "http" ) - add_shortcut( "https" ) - add_shortcut( "unsv" ) - add_shortcut( "itpc" ) /* iTunes Podcast */ - add_shortcut( "icyx" ) + /* 'itpc' = iTunes Podcast */ + add_shortcut( "http", "https", "unsv", "itpc", "icyx" ) set_callbacks( Open, Close ) vlc_module_end () @@ -1076,7 +1074,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) /* */ case ACCESS_GET_PTS_DELAY: pi_64 = (int64_t*)va_arg( args, int64_t * ); - *pi_64 = (int64_t)var_GetInteger( p_access, "http-caching" ) * 1000; + *pi_64 = var_GetInteger( p_access, "http-caching" ) * 1000; break; /* */ @@ -1287,7 +1285,7 @@ static int Request( access_t *p_access, uint64_t i_tell ) } /* User Agent */ net_Printf( p_access, p_sys->fd, pvs, - "User-Agent: %s LibVLC/"VERSION"\r\n", + "User-Agent: %s\r\n", p_sys->psz_user_agent ); /* Offset */ if( p_sys->i_version == 1 && ! p_sys->b_continuous )