Changeset 173809 in webkit


Ignore:
Timestamp:
Sep 22, 2014 1:15:32 AM (10 years ago)
Author:
Philippe Normand
Message:

[GStreamer] Cannot play Vimeo video
https://bugs.webkit.org/show_bug.cgi?id=134969

Reviewed by Sergio Villar Senin.

Source/WebCore:

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.

LayoutTests:

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.

Location:
trunk
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r173806 r173809  
     12014-09-17  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] Cannot play Vimeo video
     4        https://bugs.webkit.org/show_bug.cgi?id=134969
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        New test for a HLS stream enforcing a specific cookie before
     9        serving its fragments, like Vimeo does.
     10
     11        * http/tests/media/hls/video-cookie-expected.txt: Added.
     12        * http/tests/media/hls/video-cookie.html: Added.
     13        * http/tests/media/resources/hls/playlist-with-cookie.m3u8: Added.
     14        * http/tests/media/resources/hls/sub-playlist-with-cookie.php: Added.
     15        * http/tests/media/resources/video-cookie-check-cookie.php:
     16        * platform/gtk/TestExpectations: Marked test as slow, as the other
     17        HLS test.
     18
    1192014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>
    220
  • trunk/LayoutTests/http/tests/media/resources/video-cookie-check-cookie.php

    r54026 r173809  
    22    if($_COOKIE["TEST"])
    33    {
    4         $extension = substr($_COOKIE["TEST"], -3);
    5 
     4        $extension = pathinfo($_COOKIE["TEST"], PATHINFO_EXTENSION);
    65        if ($extension == 'mp4') {
    76               header("Content-Type: video/mp4");
     
    109               header("Content-Type: video/ogg");
    1110               $fileName = "test.ogv";
     11        } else if ($extension == 'ts') {
     12               header("Content-Type: video/mpegts");
     13               $fileName = "hls/test.ts";
    1214        } else
    1315               die;
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r173654 r173809  
    10291029webkit.org/b/119264 transitions/created-while-suspended.html [ Pass Slow ]
    10301030
     1031Bug(GTK) http/tests/media/hls/video-cookie.html [ Pass Slow ]
     1032
    10311033#////////////////////////////////////////////////////////////////////////////////////////
    10321034# End of slow tests
  • trunk/LayoutTests/platform/mac/TestExpectations

    r173585 r173809  
    13881388webkit.org/b/135390 fast/css/fontloader-page-cache.html [ Pass ]
    13891389webkit.org/b/135390 http/tests/webfont/fontloader-loading-attribute.html [ Pass ]
     1390
     1391webkit.org/b/136994 http/tests/media/hls/video-cookie.html [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r173808 r173809  
     12014-09-17  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] Cannot play Vimeo video
     4        https://bugs.webkit.org/show_bug.cgi?id=134969
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        Ensure the GStreamer HTTP source element also sends cookies when
     9        it's sending its requests. Some streaming platforms such as Vimeo
     10        do server-side cookie checks on incoming requests before serving
     11        media data.
     12
     13        Test: http/tests/media/hls/video-cookie.html
     14
     15        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
     16        (webKitWebSrcStart): Set first-party cookie URL to the request so
     17        the ResourceLoader properly sets cookies in the HTTP request.
     18
    1192014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>
    220
  • trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp

    r173654 r173809  
    465465    ResourceRequest request(url);
    466466    request.setAllowCookies(true);
     467    request.setFirstPartyForCookies(url);
    467468
    468469    if (priv->player)
Note: See TracChangeset for help on using the changeset viewer.