]> git.sesse.net Git - vlc/commitdiff
HTTP: add LibVLC version to User-Agent correctly
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 29 May 2010 16:03:23 +0000 (19:03 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 29 May 2010 16:08:23 +0000 (19:08 +0300)
modules/access/http.c
share/lua/playlist/appletrailers.lua
share/lua/sd/appletrailers.lua

index 747eba0675886bedc68ecb8786135b9361c5ed68..94355047918333d12e3f817b83b5d482c1848170 100644 (file)
@@ -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 )
index 3e2688dab2df9d390d911e5e360bf5433f844cab..dd1a5f1246da3320c16a0419c11f398d87343826 100644 (file)
@@ -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
index 92beddab999496c54644df6df01fb687ab18ede9..93d3effdf8d578c884f0a8c86b4938919bfc2a30 100644 (file)
@@ -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