[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:09:45 CEST 2010


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 29 19:09:37 2010 +0300| [b1d15aef5c05ea25da6cfc2bc5a84c7417a4f0c4] | committer: Rémi Denis-Courmont 

HTTP: add LibVLC version to User-Agent correctly

(cherry picked from commit 3d37be4f70d386e9751ec41309f82475ffae0ad8)

Conflicts:

	share/lua/sd/appletrailers.lua

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=b1d15aef5c05ea25da6cfc2bc5a84c7417a4f0c4
---

 modules/access/http.c                |    3 ++-
 share/lua/playlist/appletrailers.lua |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index ce1348c..707ac16 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



More information about the vlc-commits mailing list