Diff
Modified: releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog (173954 => 173955)
--- releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog 2014-09-25 13:13:39 UTC (rev 173954)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog 2014-09-25 13:25:01 UTC (rev 173955)
@@ -1,3 +1,21 @@
+2014-09-17 Philippe Normand <[email protected]>
+
+ [GStreamer] Cannot play Vimeo video
+ https://bugs.webkit.org/show_bug.cgi?id=134969
+
+ Reviewed by Sergio Villar Senin.
+
+ New test for a HLS stream enforcing a specific cookie before
+ serving its fragments, like Vimeo does.
+
+ * http/tests/media/hls/video-cookie-expected.txt: Added.
+ * http/tests/media/hls/video-cookie.html: Added.
+ * http/tests/media/resources/hls/playlist-with-cookie.m3u8: Added.
+ * http/tests/media/resources/hls/sub-playlist-with-cookie.php: Added.
+ * http/tests/media/resources/video-cookie-check-cookie.php:
+ * platform/gtk/TestExpectations: Marked test as slow, as the other
+ HLS test.
+
2014-08-18 Diego Pino Garcia <[email protected]>
Completed iterator can be revived by adding more than one new entry to the target object
Added: releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/hls/video-cookie-expected.txt (0 => 173955)
--- releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/hls/video-cookie-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/hls/video-cookie-expected.txt 2014-09-25 13:25:01 UTC (rev 173955)
@@ -0,0 +1,4 @@
+
+EVENT(play)
+END OF TEST
+
Added: releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/hls/video-cookie.html (0 => 173955)
--- releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/hls/video-cookie.html (rev 0)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/hls/video-cookie.html 2014-09-25 13:25:01 UTC (rev 173955)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src=""
+ <script src=""
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.setAlwaysAcceptCookies(true);
+ testRunner.waitUntilDone();
+ }
+
+ function start() {
+ video = document.getElementById('video');
+ waitForEventAndEnd('play');
+ waitForEventAndFail('stalled');
+ video.src = ""
+ }
+ </script>
+ </head>
+ <body _onload_="start()">
+ <video id="video" autoplay></video>
+ </body>
+</html>
Added: releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/resources/hls/playlist-with-cookie.m3u8 (0 => 173955)
--- releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/resources/hls/playlist-with-cookie.m3u8 (rev 0)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/resources/hls/playlist-with-cookie.m3u8 2014-09-25 13:25:01 UTC (rev 173955)
@@ -0,0 +1,5 @@
+#EXTM3U
+
+#EXT-X-STREAM-INF:PROGRAM-ID=1
+sub-playlist-with-cookie.php
+
Added: releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/resources/hls/sub-playlist-with-cookie.php (0 => 173955)
--- releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/resources/hls/sub-playlist-with-cookie.php (rev 0)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/resources/hls/sub-playlist-with-cookie.php 2014-09-25 13:25:01 UTC (rev 173955)
@@ -0,0 +1,32 @@
+<?php
+# See the HLS ITEF spec: <http://tools.ietf.org/id/draft-pantos-http-live-streaming-12.txt>
+header("Status: 200 OK");
+header("HTTP/1.1 200 OK");
+header("Connection: close");
+header('Cache-Control: no-store, no-cache="set-cookie"\n');
+header("Access-Control-Allow-Origin: *");
+header("Etag: " . '"' . filesize(__FILE__) . "-" . filemtime(__FILE__) . '"');
+header("Set-Cookie: TEST=test.ts; path=/media/resources/");
+header("Content-Type: application/x-mpegurl");
+header("Content-Length: " . filesize(__FILE__));
+
+$chunkDuration = 6.0272;
+$chunkCount = 4;
+
+function println($string) { return print($string . PHP_EOL); }
+
+println("#EXTM3U");
+println("#EXT-X-TARGETDURATION:7");
+println("#EXT-X-VERSION:4");
+println("#EXT-X-MEDIA-SEQUENCE:" . (time() / $chunkDuration % 100));
+
+$time = time();
+$time = $time - $time % $chunkDuration;
+
+for ($i = 0; $i < $chunkCount; ++$i) {
+ $time += 6;
+ println("#EXT-X-PROGRAM-DATE-TIME:" . gmdate("c", $time));
+ println("#EXTINF:" . $chunkDuration . ",");
+ println("../video-cookie-check-cookie.php");
+}
+?>
Modified: releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/resources/video-cookie-check-cookie.php (173954 => 173955)
--- releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/resources/video-cookie-check-cookie.php 2014-09-25 13:13:39 UTC (rev 173954)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/http/tests/media/resources/video-cookie-check-cookie.php 2014-09-25 13:25:01 UTC (rev 173955)
@@ -1,14 +1,16 @@
<?php
if($_COOKIE["TEST"])
{
- $extension = substr($_COOKIE["TEST"], -3);
-
+ $extension = pathinfo($_COOKIE["TEST"], PATHINFO_EXTENSION);
if ($extension == 'mp4') {
header("Content-Type: video/mp4");
$fileName = "test.mp4";
} else if ($extension == 'ogv') {
header("Content-Type: video/ogg");
$fileName = "test.ogv";
+ } else if ($extension == 'ts') {
+ header("Content-Type: video/mpegts");
+ $fileName = "hls/test.ts";
} else
die;
Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog (173954 => 173955)
--- releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog 2014-09-25 13:13:39 UTC (rev 173954)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog 2014-09-25 13:25:01 UTC (rev 173955)
@@ -1,3 +1,21 @@
+2014-09-17 Philippe Normand <[email protected]>
+
+ [GStreamer] Cannot play Vimeo video
+ https://bugs.webkit.org/show_bug.cgi?id=134969
+
+ Reviewed by Sergio Villar Senin.
+
+ Ensure the GStreamer HTTP source element also sends cookies when
+ it's sending its requests. Some streaming platforms such as Vimeo
+ do server-side cookie checks on incoming requests before serving
+ media data.
+
+ Test: http/tests/media/hls/video-cookie.html
+
+ * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+ (webKitWebSrcStart): Set first-party cookie URL to the request so
+ the ResourceLoader properly sets cookies in the HTTP request.
+
2014-08-07 Simon Fraser <[email protected]>
HTML <sub> and <sup> elements do not work in some 64-bit builds
Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp (173954 => 173955)
--- releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp 2014-09-25 13:13:39 UTC (rev 173954)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp 2014-09-25 13:25:01 UTC (rev 173955)
@@ -494,6 +494,7 @@
ResourceRequest request(url);
request.setAllowCookies(true);
+ request.setFirstPartyForCookies(url);
if (priv->player)
request.setHTTPReferrer(priv->player->referrer());