M3U file with HTTP links fails due to a bug in VLC GET request
I'm using nightly build VLC-Android-2.1.0-20170204-0235-ARMv7.apk on Android 6.0.1 (32 bit).
When a local (or network) M3U file is opened in VLC the HTTP links in that playlist (ts streams) return error 404, due to a bug in VLC GET request. Here is how VLC sends a request:
GET http://server.com:8888/file.php?query1=1&query2=ABC HTTP/1.1
Host: server.com:8888
Accept: */*
Accept-Language: en_US
User-Agent: VLC/3.0.0-git LibVLC/3.0.0-git
Range: bytes=0-
This request causes a server error 404, because the GET line should not include the "http://server.com:8888" part. Here is how the correct request should look like:
GET /file.php?query1=1&query2=ABC HTTP/1.1
Host: server.com:8888
Accept: */*
Accept-Language: en_US
User-Agent: VLC/3.0.0-git LibVLC/3.0.0-git
Range: bytes=0-
I investigated this bug by using a proxy on a PC where the GET line was auto-corrected by the proxy and VLC (Android) started the video stream just fine.