Bug 20739 - Youku.com flash video does not play when it's embedded in a 3rd party web page (Referrer not sent?)
Summary: Youku.com flash video does not play when it's embedded in a 3rd party web pag...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://www.oneava.cn/read.php?tid=49
Keywords: InRadar
Depends on:
Reported: 2008-09-08 22:51 PDT by Ananta
Modified: 2022-06-20 17:08 PDT (History)
6 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ananta 2008-09-08 22:51:48 PDT
Youku.com is #1 youtube-like site in China. 

What steps will reproduce the problem?
1. go to http://www.oneava.cn/read.php?tid=49
2. wait a a few seconds
3. press a large play button in the middle of 'flash' frame 

What is the expected output? What do you see instead?

Flash movie should be played. Instead, we get an error message in Chinese.

Here are the headers caught with Google Chrome/Opera/Safari on Mac GET 
C5378F42C4EC.flv HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) 
AppleWebKit/525.13 (KHTML, like Gecko) Chrome/ Safari/525.13
Referer: http://www.oneava.cn/read.php?tid=49
Accept: */*
Accept-Language: zh-CN,zh
Accept-Charset: gb18030,*,utf-8
Accept-Encoding: gzip,deflate,bzip2
Connection: Keep-Alive

Here are IE's headers: GET 
C5114F6C4B05.flv?start=170 HTTP/1.1
Accept: */*
Accept-Language: zh-CN
Referer: http://static.youku.com/v1.0.0320/v/swf/qplayer.swf
x-flash-version: 9,0,124,0
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Connection: Keep-Alive

Basically they need to check the referer to make sure the request comes 
from the flash they created, instead of a download link. IE gives referer 
as the url of flash swf, while the referer in Safari(Mac), gives the url of the page, which fails their check.

Some more info

The value of Referer: field is different in different browsers. There's a recent mail from an Opera engineer about the issue in NPAPI plugin-future mailing list. (I can't give a url because the archive is protected).  

The gist of that email is :

IE7/IE8 : sends the URL of the requesting plug-in 
Firefox3: does not send a referer (except in a very special case : [3])
Safari 3.1 (Windows) : does not send a referer
Safari 3.1 (Mac) : sends the embedding page URL.
Google Chrome : sends the embedding page URL
Opera : sends the embedding page URL

Other related links are :
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=410904
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=383708
[3] http://www.actionscript.org/forums/showthread.php3?t=164503

Should webkit attempt to match IE's behavior and always set the default referer
to the plugin URL?
Comment 1 Mariusz Lusiak 2010-04-20 02:12:02 PDT
Is there any update on this?

The misleading behavior of Safari is still present in version 4.0.5. The Mac version does send a referrer for embedded flash whereas the Windows version doesn't. Is it going to be unified in some way?
Comment 2 Alexey Proskuryakov 2010-04-20 16:33:49 PDT
This bug is about the youku.com failure specifically, but the example URL is not accessible now.

The difference between Mac and Windows may or may not the cause, and may or may not be a WebKit issue (it's possible for the Flash plug-in itself to do something different). So, while these issues are probably related, it's better to not conflate them.
Comment 3 Ahmad Saleem 2022-06-20 11:05:56 PDT
Adobe Flash is not in support and NPAPI plugins are not supported from Safari 14 onward. Can this be marked as "RESOLVED WONTFIX"? Thanks!
Comment 4 Radar WebKit Bug Importer 2022-06-20 11:06:32 PDT