7 Replies Latest reply: Aug 18, 2011 6:06 AM by kboilydev RSS

    HtmlLoader and "Referer" request header

    kboilydev


      Hi,

       

      We're using the HtmlLoader in our Flex project (AIR 2.7) for restricted browsing (some URLs are denied).

       

      I'm testing in unrestricted mode and I'm having problems with some HTTP requests that are done with the Referer header set to "app://Main.sfw[[Dynamic]]/2" instead of the URL of the containing page. As the referer URL is wrong, I'm receiving "access denied" messages instead of the content I'm expecting (typically, SWF files).

       

      I figured that the default referer was set to the app file. I've tried adding ResquestHeader("Referer",location) to the requestHeaders array and using an intermedite URLLoader to load the datas but nothing worked, the latter provoking javascript errors.

       

      Is there any way I could change the referer before the request is sent? And why is it set to the default value instead of what it should be?

       

      Here's an example of a website I'm having trouble with : http://www.nitrome.com/games/rubbletroubletokyo/

       

      When you click the "Skip Ad" button, the referer is set to the app instead of "http://www.nitrome.com/games/rubbletroubletokyo/". By the way, the button is part of an SWF movie and my guess is that's the source of the problem. The HtmlLoader should, however, be able to handle those.

       

      The secured browser is a really important feature in our app and I'd really appreciated any help on this.

       

      Thanks!!

       

      Message was edited by: kboilydev : corrected typos