Right now it looks to me like neither toplevel worker loads nor importScripts set any referrers. They should, as far as I can tell per spec.
https://mxr.mozilla.org/mozilla-central/source/dom/workers/ScriptLoader.cpp#194 We do set a referrer in ScriptLoader. Is it not enough?
It seems we even have a test for the top level script case: https://dxr.mozilla.org/mozilla-central/source/dom/workers/test/test_referrer.html
Hmm. I filed the bug based on the claim in bug 1218110 comment 10 that importScripts does not send a referrer header. Could we check whether it actually does? It's possible the claim was just wrong.
Definitely invalid. But I wrote a test. Nice to land it.
Attachment #8689191 - Flags: review?(bkelly)
Summary: Various worker channels should have a referer header → Improve the referrer checks in worker mochitests
Attachment #8689191 - Flags: review?(bkelly) → review+
Thanks! Sorry for the lack of context on the original bug.
You need to log in before you can comment on or make changes to this bug.