Temporary redirected m3u8 streaming stopped working.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Aug 2016 18:48:16 +0000 (18:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Aug 2016 18:48:16 +0000 (18:48 +0000)
commit1a5e4d58830701eb25f6bf2a28cbbc20bb68407b
treed649b6951ca4b4aa39408e4eaa802f443e328e3f
parentc193d2d49aee1cecc11e306fbb5847e5d3fc03ca
Temporary redirected m3u8 streaming stopped working.
https://bugs.webkit.org/show_bug.cgi?id=160472
rdar://problem/27592694

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-08-04
Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/media/hls/hls-redirect.html

The change for https://trac.webkit.org/changeset/202466 hides knowledge of the temporary redirected URL from
WebCoreNSURLSession clients. MPEG playlists (e.g. .m3u8) can contain paths relative to the redirected URL.

This change exposes the redirected URL for MPEG playlists.

* platform/MIMETypeRegistry.cpp:
(WebCore::initializeMPEGPlaylistMIMETypes): Added.
(WebCore::initializeMIMETypeRegistry):
(WebCore::MIMETypeRegistry::isMPEGPlaylistMIMEType): Added.
* platform/MIMETypeRegistry.h:
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:]): Add MPEG playlist condition.
(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]): Add MPEG playlist condition.

LayoutTests:

This tests that m3u8 files can be loaded when going through a temporary redirect.

* http/tests/media/hls/hls-redirect-expected.txt: Added.
* http/tests/media/hls/hls-redirect.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/media/hls/hls-redirect-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/media/hls/hls-redirect.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/MIMETypeRegistry.cpp
Source/WebCore/platform/MIMETypeRegistry.h
Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm