Title: [204192] trunk
Revision
204192
Author
[email protected]
Date
2016-08-05 14:19:43 -0700 (Fri, 05 Aug 2016)

Log Message

Unreviewed, rolling out r204128.
https://bugs.webkit.org/show_bug.cgi?id=160607

Solve the issue by removing the workaround for static files
(Requested by jonlee_ on #webkit).

Reverted changeset:

"Temporary redirected m3u8 streaming stopped working."
https://bugs.webkit.org/show_bug.cgi?id=160472
http://trac.webkit.org/changeset/204128

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (204191 => 204192)


--- trunk/LayoutTests/ChangeLog	2016-08-05 20:27:33 UTC (rev 204191)
+++ trunk/LayoutTests/ChangeLog	2016-08-05 21:19:43 UTC (rev 204192)
@@ -1,3 +1,17 @@
+2016-08-05  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r204128.
+        https://bugs.webkit.org/show_bug.cgi?id=160607
+
+        Solve the issue by removing the workaround for static files
+        (Requested by jonlee_ on #webkit).
+
+        Reverted changeset:
+
+        "Temporary redirected m3u8 streaming stopped working."
+        https://bugs.webkit.org/show_bug.cgi?id=160472
+        http://trac.webkit.org/changeset/204128
+
 2016-08-05  Jonathan Bedard  <[email protected]>
 
         Remove testRunner.handleErrorPages()

Deleted: trunk/LayoutTests/http/tests/media/hls/hls-redirect-expected.txt (204191 => 204192)


--- trunk/LayoutTests/http/tests/media/hls/hls-redirect-expected.txt	2016-08-05 20:27:33 UTC (rev 204191)
+++ trunk/LayoutTests/http/tests/media/hls/hls-redirect-expected.txt	2016-08-05 21:19:43 UTC (rev 204192)
@@ -1,4 +0,0 @@
-
-load metadata OK
-END OF TEST
-

Deleted: trunk/LayoutTests/http/tests/media/hls/hls-redirect.html (204191 => 204192)


--- trunk/LayoutTests/http/tests/media/hls/hls-redirect.html	2016-08-05 20:27:33 UTC (rev 204191)
+++ trunk/LayoutTests/http/tests/media/hls/hls-redirect.html	2016-08-05 21:19:43 UTC (rev 204192)
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<video src="" _onloadedmetadata_="logResult(true, 'load metadata'); endTest()" _onerror_="failTest('load error')"></video>
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (204191 => 204192)


--- trunk/Source/WebCore/ChangeLog	2016-08-05 20:27:33 UTC (rev 204191)
+++ trunk/Source/WebCore/ChangeLog	2016-08-05 21:19:43 UTC (rev 204192)
@@ -1,3 +1,17 @@
+2016-08-05  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r204128.
+        https://bugs.webkit.org/show_bug.cgi?id=160607
+
+        Solve the issue by removing the workaround for static files
+        (Requested by jonlee_ on #webkit).
+
+        Reverted changeset:
+
+        "Temporary redirected m3u8 streaming stopped working."
+        https://bugs.webkit.org/show_bug.cgi?id=160472
+        http://trac.webkit.org/changeset/204128
+
 2016-08-05  Brent Fulgham  <[email protected]>
 
         validity assertion fails after removing a child of an <optgroup> element

Modified: trunk/Source/WebCore/platform/MIMETypeRegistry.cpp (204191 => 204192)


--- trunk/Source/WebCore/platform/MIMETypeRegistry.cpp	2016-08-05 20:27:33 UTC (rev 204191)
+++ trunk/Source/WebCore/platform/MIMETypeRegistry.cpp	2016-08-05 21:19:43 UTC (rev 204192)
@@ -146,7 +146,6 @@
 static HashSet<String, ASCIICaseInsensitiveHash>* supportedJavaScriptMIMETypes;
 static HashSet<String, ASCIICaseInsensitiveHash>* supportedNonImageMIMETypes;
 static HashSet<String, ASCIICaseInsensitiveHash>* supportedMediaMIMETypes;
-static HashSet<String, ASCIICaseInsensitiveHash>* mpegPlaylistMIMETypes;
 static HashSet<String, ASCIICaseInsensitiveHash>* pdfMIMETypes;
 static HashSet<String, ASCIICaseInsensitiveHash>* pdfAndPostScriptMIMETypes;
 static HashSet<String, ASCIICaseInsensitiveHash>* unsupportedTextMIMETypes;
@@ -302,22 +301,6 @@
         supportedJavaScriptMIMETypes->add(type);
 }
 
-static void initializeMPEGPlaylistMIMETypes()
-{
-    const char* const types[] = {
-        "application/vnd.apple.mpegurl",
-        "application/mpegurl",
-        "application/x-mpegurl",
-        "audio/mpegurl",
-        "audio/x-mpegurl",
-        "audio/mpegurl",
-        "audio/x-mpegurl"
-    };
-
-    for (auto& type : types)
-        mpegPlaylistMIMETypes->add(type);
-}
-
 static void initializePDFMIMETypes()
 {
     const char* const types[] = {
@@ -472,9 +455,6 @@
     supportedImageMIMETypes = new HashSet<String, ASCIICaseInsensitiveHash>;
     initializeSupportedImageMIMETypes();
 
-    mpegPlaylistMIMETypes = new HashSet<String, ASCIICaseInsensitiveHash>;
-    initializeMPEGPlaylistMIMETypes();
-
     pdfMIMETypes = new HashSet<String, ASCIICaseInsensitiveHash>;
     initializePDFMIMETypes();
 
@@ -573,15 +553,6 @@
         || mimeType.startsWith("application/x-java-vm", false);
 }
 
-bool MIMETypeRegistry::isMPEGPlaylistMIMEType(const String& mimeType)
-{
-    if (mimeType.isEmpty())
-        return false;
-    if (!mpegPlaylistMIMETypes)
-        initializeMIMETypeRegistry();
-    return mpegPlaylistMIMETypes->contains(mimeType);
-}
-
 bool MIMETypeRegistry::isPDFOrPostScriptMIMEType(const String& mimeType)
 {
     if (mimeType.isEmpty())

Modified: trunk/Source/WebCore/platform/MIMETypeRegistry.h (204191 => 204192)


--- trunk/Source/WebCore/platform/MIMETypeRegistry.h	2016-08-05 20:27:33 UTC (rev 204191)
+++ trunk/Source/WebCore/platform/MIMETypeRegistry.h	2016-08-05 21:19:43 UTC (rev 204192)
@@ -76,9 +76,6 @@
     // Check to see if a MIME type is a plugin implemented by the browser.
     static bool isApplicationPluginMIMEType(const String& mimeType);
 
-    // Check to see if a MIME type is one of the MPEG playlists types.
-    static bool isMPEGPlaylistMIMEType(const String& mimeType);
-
     // Check to see if a MIME type is one of the common PDF/PS types.
     WEBCORE_EXPORT static bool isPDFOrPostScriptMIMEType(const String& mimeType);
     static bool isPDFMIMEType(const String& mimeType);

Modified: trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm (204191 => 204192)


--- trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm	2016-08-05 20:27:33 UTC (rev 204191)
+++ trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm	2016-08-05 21:19:43 UTC (rev 204192)
@@ -29,7 +29,6 @@
 #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
 
 #import "CachedResourceRequest.h"
-#import "MIMETypeRegistry.h"
 #import "PlatformMediaResourceLoader.h"
 #import "SecurityOrigin.h"
 #import "SubresourceLoader.h"
@@ -587,20 +586,9 @@
         // and use that URL for all future requests for the same piece of media. This breaks
         // certain features of CORS, as well as being against the HTTP spec in the case of
         // non-permanent redirects.
-
-        // Exclude MPEG Playlists since these require the redirected URL as the base URL
-        // for relative paths.
-        String mimeType = response.nsURLResponse().MIMEType;
-        if (mimeType.isEmpty() || mimeType == "application/octet-stream" || mimeType == "text/plain") {
-            String extension = response.nsURLResponse().URL.pathExtension;
-            mimeType = MIMETypeRegistry::getMediaMIMETypeForExtension(extension);
-
-        }
-        if (!MIMETypeRegistry::isMPEGPlaylistMIMEType(mimeType)) {
-            auto responseData = response.crossThreadData();
-            responseData.url = ""
-            strongResponse = ResourceResponseBase::fromCrossThreadData(WTFMove(responseData)).nsURLResponse();
-        }
+        auto responseData = response.crossThreadData();
+        responseData.url = ""
+        strongResponse = ResourceResponseBase::fromCrossThreadData(WTFMove(responseData)).nsURLResponse();
     }
 
     RetainPtr<WebCoreNSURLSessionDataTask> strongSelf { self };
@@ -670,19 +658,9 @@
     // FIXME(<rdar://problem/27000361>):
     // Do not update the current request if the redirect is temporary; use this
     // current request during responseReceieved: to work around a CoreMedia bug.
+    if (response.httpStatusCode() != 302 && response.httpStatusCode() != 307)
+        self.currentRequest = [NSURLRequest requestWithURL:request.url()];
 
-    // Exclude MPEG Playlists since these require the redirected URL as the base URL
-    // for relative paths.
-    if (response.httpStatusCode() != 302 && response.httpStatusCode() != 307) {
-        String mimeType = response.nsURLResponse().MIMEType;
-        if (mimeType.isEmpty() || mimeType == "application/octet-stream" || mimeType == "text/plain") {
-            String extension = response.nsURLResponse().URL.pathExtension;
-            mimeType = MIMETypeRegistry::getMediaMIMETypeForExtension(extension);
-        }
-        if (!MIMETypeRegistry::isMPEGPlaylistMIMEType(mimeType))
-            self.currentRequest = [NSURLRequest requestWithURL:request.url()];
-    }
-
     [self.session updateHasSingleSecurityOrigin:SecurityOrigin::create(request.url())];
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to