0 Replies Latest reply on Jul 21, 2009 7:39 AM by sentromed

    Stream Error if URL contains \x00 (%00).




      I use localTrusted sandbox and test all on my local PC. My system is Windows XP SP2. I use Eclipse Flex Builder 3.

      I am trying to download URL page, but always get error: Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://google.com/search?q=aaa%00hhh.

      I am using the google.com just for testing, but my request may contain \x00. I tested several values and the issue is in \x00 char.

      I ran net sniffer and I got responce HTTP 200, OK to my request with \x00. But Flex always raised the Stream Error.


      Here is my simple test function:

      public function test():void
          request = new URLRequest();
          loader = new URLLoader();
          request.url = 'http://google.com/search';
          request.data = 'q=' + escape('aaa\x00hhh');
          loader.dataFormat = URLLoaderDataFormat.BINARY;
          loader.addEventListener(Event.COMPLETE, addAsync(completeHandlerAnnounce,2000));


      My function completeHandlerAnnounce is not called. But if I remove \x00, it is called.


      Could you please clarify: is is a bug or I do something wrong?


      The other issue I have with URLVariables.

      var a:URLVariables = new URLVariables();

      a.name_a = 'xxx';

      a.name_b = 'yyy';


      When I open URL the name name_a and name_b are also escaped. So the URL bacome http://.../search?name%XXa=xxx&name%XXb=yyy.

      Is it possible to get ?name_a=xxx&name_b=yyy ?