I am testing out Roku2's capability to play HLS streams served by Wowza. I have found no problems playing static content and live streams. However, I did run into a problem with an in-house feature involving HTTP redirects that I'm hoping someone from Roku can give some pointers.
We have a feature that has user-agent detection and redirects from a generic URL to a protocol-specific URL depending on the user-agent. For example, given a generic URL "http://<domain>.com/path/to/file.mp4", and a user-agent "roku", we will perform an HTTP redirect to "http://<domain>.com/path/to/file.mp4/playlist.m3u8".
This is the sequence of events I got from tcpdump on the Roku2.
1. Roku2 does a GET on the generic URL. It receives a "HTTP/1.1 302 Found" for the correct URL that points to playlist.m3u8.
2. Roku2 does a GET on the URL "http://<domain>.com/path/to/file.mp4/playlist.m3u8". It receives a "HTTP/1.1 200 OK" and the following playlist.m3u8 file from Wowza:
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=672450
playlist.m3u8?wowzasessionid=12345678
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=64000
playlist.m3u8?wowzaaudioonly&wowzasession
3. This is where things go wrong. Roku2 does a GET on the generic URL again and somehow strips out the filename: "
http://<domain>.com/path/to/playlist.m3u8?wowzasessionid=12345678" and receives a "HTTP/1.1 302 Found" for the incorrect URL, also without a filename, and with a duplicate playlist.m3u8: "http://<domain>.com/path/to/playlist.m3u8/playlist.meu8?wowzasessionid=12345678".
4. Roku2 does a GET on the incorrect URL and receives a "HTTP/1.1 403 Forbidden", and the session ends.
For this test, I took the example "simplevideoplayer" from the SDK and hardcoded URL's in. My Roku2 is running 4.1 build 1275.
Is Roku's behavior in step 3 expected?