RESOLVED FIXED 79236
[GStreamer] webkitwebsrc: use HTTP referer provided by MediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=79236
Summary [GStreamer] webkitwebsrc: use HTTP referer provided by MediaPlayer
Philippe Normand
Reported 2012-02-22 06:40:59 PST
MediaPlayer::referrer() was recently added. We should use it.
Attachments
Patch (5.04 KB, patch)
2012-02-22 06:55 PST, Philippe Normand
no flags
Patch (5.31 KB, patch)
2012-02-22 06:59 PST, Philippe Normand
no flags
Patch (5.80 KB, patch)
2012-02-22 11:02 PST, Philippe Normand
mrobinson: review+
Philippe Normand
Comment 1 2012-02-22 06:55:32 PST
Philippe Normand
Comment 2 2012-02-22 06:59:05 PST
Martin Robinson
Comment 3 2012-02-22 08:50:09 PST
Comment on attachment 128207 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=128207&action=review Looks fine. What caused you to make this change? Is it tracked by any tests? r- for the minor fixes below. > Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:358 > priv->frame.release(); This should be priv->frame.clear() > Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:427 > + if (priv->player) > + request.setHTTPReferrer(priv->player->referrer()); > + It seems this should be outside of the if block now. I think you can simplify this a bit to be: FrameLoader* loader = priv->frame ? priv->frame->loader() : 0; if (loader) { .... } if (priv->player) request.setHTTPReferrer(priv->player->referrer()); > Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:752 > + Extra newline here
Martin Robinson
Comment 4 2012-02-22 08:51:05 PST
(In reply to comment #3) > Looks fine. What caused you to make this change? Is it tracked by any tests? r- for the minor fixes below. Oh, I see now that ::refererer() is a recent addition.
Philippe Normand
Comment 5 2012-02-22 10:57:49 PST
(In reply to comment #4) > (In reply to comment #3) > > > Looks fine. What caused you to make this change? Is it tracked by any tests? r- for the minor fixes below. > > Oh, I see now that ::refererer() is a recent addition. Yes, we had code to deal with it already but I believe it makes more sense to use this new method of the player :)
Philippe Normand
Comment 6 2012-02-22 11:02:53 PST
Philippe Normand
Comment 7 2012-02-22 11:04:06 PST
The test that should still pass is http/tests/media/video-referer.html
Philippe Normand
Comment 8 2012-02-22 11:12:39 PST
Note You need to log in before you can comment on or make changes to this bug.