Commit 3d37be4f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

HTTP: add LibVLC version to User-Agent correctly

parent c10f4954
......@@ -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 )
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment