[vlc-commits] commit: HTTP: add LibVLC version to User-Agent correctly ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Sat May 29 18:08:35 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 29 19:03:23 2010 +0300| [3d37be4f70d386e9751ec41309f82475ffae0ad8] | committer: Rémi Denis-Courmont
HTTP: add LibVLC version to User-Agent correctly
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3d37be4f70d386e9751ec41309f82475ffae0ad8
---
modules/access/http.c | 3 ++-
share/lua/playlist/appletrailers.lua | 2 +-
share/lua/sd/appletrailers.lua | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/access/http.c b/modules/access/http.c
index 747eba0..9435504 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 3e2688d..dd1a5f1 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, "<title>" )
then
diff --git a/share/lua/sd/appletrailers.lua b/share/lua/sd/appletrailers.lua
index 92bedda..93d3eff 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
More information about the vlc-commits
mailing list