Hi Eric. I'll have to work more on the process isolation since I
ultimately care about XHR and Flash requests/responses, but I gave the
'additionalHeaders' in Navigate(...) a try and I'm not seeing the
expected header on any page except the base page: Here are some
dumped headers to show you what I mean...
-->BASE PAGE
GET /watch?v=-hpiwPXkbVc HTTP/1.1
Accept: */*
Base-Page:
http://www.youtube.com/watch?v=-hpiwPXkbVc (my special
header!)
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/
4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host:
www.youtube.com
Proxy-Connection: Keep-Alive
-->RESOURCE REQUEST FROM BASE PAGE
GET /yt/cssbin/www-core-vfl134429.css HTTP/1.1
Accept: */*
Referer:
http://www.youtube.com/watch?v=-hpiwPXkbVc
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/
4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host:
s.ytimg.com
Proxy-Connection: Keep-Alive
Furthermore, I'm having trouble locating any helpful documentation on
the 'additionalHeaders' argument to verify its functionality. Since I
will probably isolate the browsers, this shouldn't matter in the end,
but it would be nice to know how that argument is supposed to work.
More interestingly, the "Referer" header is being set by the
WebBrowser control, which seems to partially resolve my issue, but
then on some requests such as:
GET /videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag
%2Calgorithm%2Cburst%2Cfactor&algorithm=throttle-
factor&itag=34&ipbits=0&burst=40&sver=3&expire=1259276400&key=yt1&signature=6C438B374EC0CE5ADB45D8A9022A24B5668A93E2.68168074C42EB683B2E960F04C6659501D43CCAC&factor=1.25&id=fa1a62c0f5e46d57
HTTP/1.1
Accept: */*
Accept-Language: en-US
Referer:
http://s.ytimg.com/yt/swf/watch-vfl134346.swf
x-flash-version: 10,0,32,18
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/
4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host:
v14.lscache1.c.youtube.com
Proxy-Connection: Keep-Alive
The "Referer" is set to the resource that made the request (the Flash
SWF file), so it seems I would then have to map that SWF file back to
the base page (through that referer) and therefore know that this
request is based on the YouTube page. I'm thinking this wouldn't
always work though as the same SWF file (for example) could be loaded
on another page and then load a different resource - I now wouldn't
know which base page to use. Plus, I don't know if the Referer header
is always sent.
So, it seems as though I have to go down the new road of process
isolation, which is completely unfamiliar to me :-)