On Sun, Jul 8, 2012 at 3:33 AM, Anne van Kesteren <[email protected]> wrote: > On Sun, Jul 8, 2012 at 3:54 AM, Jonas Sicking <[email protected]> wrote: >> What is the reason for this? This seems less consistent than using the >> same document as we use for things like same-origin checks and >> resolving relative urls. In general, we've been trying to move away >> from using the "entry script" in Gecko for things since it basically >> amounts to using a global variable which tends to be a source of bugs >> and unexpected behavior. > > Really? All new APIs still use the entry script to determine origin, > base URL, and such. The reason is that HTML fetch works this way and > provides no overrides and last time we discussed this nobody thought > it was important enough to create an override just for XMLHttpRequest.
When I researched this several years ago, this behavior was consistent across non-WebKit browsers, so I changed WebKit to match other browsers (and the spec). The entry script is used fairly consistently throughout the platform to set the Referer. Adam
