From: RĂ©mi Denis-Courmont Date: Sat, 29 May 2010 16:03:23 +0000 (+0300) Subject: HTTP: add LibVLC version to User-Agent correctly X-Git-Tag: 1.2.0-pre1~6429 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3d37be4f70d386e9751ec41309f82475ffae0ad8;p=vlc HTTP: add LibVLC version to User-Agent correctly --- diff --git a/modules/access/http.c b/modules/access/http.c index 747eba0675..9435504791 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -1286,7 +1286,8 @@ static int Request( access_t *p_access, uint64_t i_tell ) } } /* User Agent */ - net_Printf( p_access, p_sys->fd, pvs, "User-Agent: %s\r\n", + net_Printf( p_access, p_sys->fd, pvs, + "User-Agent: %s LibVLC/"VERSION"\r\n", p_sys->psz_user_agent ); /* Offset */ if( p_sys->i_version == 1 && ! p_sys->b_continuous ) diff --git a/share/lua/playlist/appletrailers.lua b/share/lua/playlist/appletrailers.lua index 3e2688dab2..dd1a5f1246 100644 --- a/share/lua/playlist/appletrailers.lua +++ b/share/lua/playlist/appletrailers.lua @@ -53,7 +53,7 @@ function parse() else extraname = "" end - table.insert( p, { path = path; name = title..extraname; description = description; url = vlc.path; options = ":http-user-agent=\"QuickTime vlc lua edition\"" } ) + table.insert( p, { path = path; name = title..extraname; description = description; url = vlc.path; options = ":http-user-agent=\"QuickTime\"" } ) end if string.match( line, "" ) then diff --git a/share/lua/sd/appletrailers.lua b/share/lua/sd/appletrailers.lua index 92beddab99..93d3effdf8 100644 --- a/share/lua/sd/appletrailers.lua +++ b/share/lua/sd/appletrailers.lua @@ -32,7 +32,7 @@ end function main() fd = vlc.stream( "http://trailers.apple.com/trailers/home/feeds/just_hd.json" ) if not fd then return nil end - options = {":http-user-agent=QuickTime/7.2 vlc edition",":demux=avformat,ffmpeg",":play-and-pause"} + options = {":http-user-agent=QuickTime/7.2",":demux=avformat,ffmpeg",":play-and-pause"} line = fd:readline() while line ~= nil do