More clues, after fiddling around with downloading text files and using 
crossdomain.xml on my own server.

When I'm loading the text file from a different host name, it requires a 
crossdomain.xml file to allow access to the file -- removing the 
crossdomain.xml file or the <allow-access-from domain="*" /> from that 
file results in both browsers returning a null string (access denied, as 
it's supposed to work). But my problems is that YouTube is sending me a 
proper crossdomain.xml file that allows access from everywhere, then IE 
is requesting the content and getting it back from YouTube, but Flash is 
acting like the request failed or access was denied (even though it 
fetched the content), while Flash in Firefox works just fine and returns 
the content. When I test it on my own server, IE is allowed and Flash 
gets the content, but against YouTube's server, it's denied.

When I use Firefox, clear the cache, and load a test flash file that 
loads an xml file from youtube, it first fetches crossdomain.xml, sends 
these headers, and gets this response:

Host: www.youtube.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) 
Gecko/20060909 Firefox/1.5.0.7
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Cookie: 
LOGIN_INFO=dda826149e0e26de6ec8e7f0a9f267fce3QgAAAAbV91c2VyX2lkX0FORF9zZXNzaW9uX251bWJlcl9tZDVzIAAAAGEwODNmNzhmNzZlMTkzZjQ3YmI5ZWM1NjYyNDlmZDFkdAkAAABtX3VzZXJfaWRsAgAAAM9S6wMw;
 
VISITOR_INFO1_LIVE=vP5JK5d6W8w; 
use_hitbox=72c46ff6cbcdb7c5585c36411b6b334edAEAAAAw; 
user_omniture=3756d44ab2f6fdee26892cc5805390c2dAEAAAAw; 
watched_video_id_list_a2deh=e98a31cbffe67f8c366157bb7c9c47fcWwIAAABzCwAAADNfU1N1TzFnVVVFcwsAAABEQnpxUWpEUUg2QQ==

<?xml version="1.0"?>
<!-- http://www.youtube.com/crossdomain.xml -->
<cross-domain-policy>
  <allow-access-from domain="*" />
</cross-domain-policy>


But when I use IE, clear the cache, and load the same test flash file, 
it sends these headers and gets this response:

Accept: */*
x-flash-version: 9,0,16,0
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 1.0.3705)
Host: www.youtube.com
Proxy-Connection: Keep-Alive
Cookie: VISITOR_INFO1_LIVE=82Ztya2U95o

and gets this response:

<?xml version="1.0"?>
<!-- http://www.youtube.com/crossdomain.xml -->
<cross-domain-policy>
  <allow-access-from domain="*" />
</cross-domain-policy>

Even though that's a good looking crossdomain.xml, the flash player 
can't fetch files in ie but works fine in firefox.

When I made a crossdomain.xml on my server that denies access, Flash 
does NOT fetch the text file because it's denied access first. So I 
don't think this is a crossdomain problem. In the case of accessing 
youtube from Flash in IE, it fetches the crossdomain.xml file 
successfully and then fetches the html file successfully (because it was 
permitted access), but then SOMETHING ELSE goes wrong after the html 
content arrives, and Flash reports null back to my onData handler 
instead of the html content string.

Here is the request that ie sends out for the html file, which succeeds, 
and returns valid content, but then Flash acts like it failed:

GET http://www.youtube.com/watch?v=3_SSuO1gUUE HTTP/1.1

Accept: */*
Referer: http://www.donhopkins.com/video/test/video/test-xml.lzx?lzt=swf
x-flash-version: 9,0,16,0
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 1.0.3705)
Host: www.youtube.com
Proxy-Connection: Keep-Alive
Cookie: VISITOR_INFO1_LIVE=82Ztya2U95o; 
use_hitbox=3d11d5cb2b3e40e368f83f82e88170a4dAEAAAAx; 
user_omniture=3756d44ab2f6fdee26892cc5805390c2dAEAAAAw; 
watched_video_id_list=e3cb7278961c02786956774e9199cf89WwEAAABzCwAAADNfU1N1TzFnVVVF

Here is the equivalent request to my server that succeeds, and returns 
valid content:

GET http://www.piemenu.com/foo.txt HTTP/1.1

Accept: */*
Referer: http://www.donhopkins.com/video/test/video/test-xml.lzx?lzt=swf
x-flash-version: 9,0,16,0
Accept-Encoding: gzip, deflate
If-Modified-Since: Wed, 27 Sep 2006 07:41:32 GMT
If-None-Match: "5d035f-7-8d402300"
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 1.0.3705)
Host: www.piemenu.com
Proxy-Connection: Keep-Alive

Very weird!

    -Don



_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to