4 Replies Latest reply on Sep 18, 2006 7:31 AM by Newsgroup_User

    HTTPService and HTTPS problem

    Level 7
      I've made an application with many HTTPService request, it runs
      perfectly when urls are HTTP://....
      i've replaced all HTTP requests to HTTPS request and uploaded to an
      HTTPS server then i get the following error on fault event:
      ...
      ...Error #2032: Sequence Error...
      faultString="HTTP Request Error"
      ...

      * The application uses spanish characters so it has '<?xml version="1.0"
      encoding="iso-8859-1"?>' at the begining of the main mxml file.

      * The crossdomain file contains:
      <?xml version="1.0"?>
      <!DOCTYPE cross-domain-policy SYSTEM
      " http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
      <cross-domain-policy>
      <allow-access-from domain="*" />
      </cross-domain-policy>

      * The routine who make the request:
      hs=new HTTPService(null);
      hs.resultFormat='object';
      var t:Array=PATH_PROFESION.split('?');
      if(t[1]!=undefined){
      hs.url=t[0]+'?'+encodeURIComponent(t[1]);
      }else{
      hs.url=PATH_PROFESION;
      }
      hs.destination="DefaultHTTPS";
      hs.method='GET';
      hs.useProxy=false;
      hs.addEventListener("result",getResult_Profesion);
      hs.addEventListener("fault",getFault_Profesion);
      hs.send();

      * The final url is a PHP script with GET parameters like:
      https://xxxxxxxxxx/xxxxx/php_script.php?E:snddata.php&d=profe
      the call to the php script is ok, i'm saving some text to a log file on
      the server so i know the request is comming ok.


      Can you give me a light about it?

      Thanks in advance

        • 1. Re: HTTPService and HTTPS problem
          Level 7
          I've detected it's an Internet Explorer issue, whe i test it on Firefox
          it works perfectly.




          ddanone escribió:
          > I've made an application with many HTTPService request, it runs
          > perfectly when urls are HTTP://....
          > i've replaced all HTTP requests to HTTPS request and uploaded to an
          > HTTPS server then i get the following error on fault event:
          > ....
          > ....Error #2032: Sequence Error...
          > faultString="HTTP Request Error"
          > ....
          >
          > * The application uses spanish characters so it has '<?xml version="1.0"
          > encoding="iso-8859-1"?>' at the begining of the main mxml file.
          >
          > * The crossdomain file contains:
          > <?xml version="1.0"?>
          > <!DOCTYPE cross-domain-policy SYSTEM
          > " http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
          > <cross-domain-policy>
          > <allow-access-from domain="*" />
          > </cross-domain-policy>
          >
          > * The routine who make the request:
          > hs=new HTTPService(null);
          > hs.resultFormat='object';
          > var t:Array=PATH_PROFESION.split('?');
          > if(t[1]!=undefined){
          > hs.url=t[0]+'?'+encodeURIComponent(t[1]);
          > }else{
          > hs.url=PATH_PROFESION;
          > }
          > hs.destination="DefaultHTTPS";
          > hs.method='GET';
          > hs.useProxy=false;
          > hs.addEventListener("result",getResult_Profesion);
          > hs.addEventListener("fault",getFault_Profesion);
          > hs.send();
          >
          > * The final url is a PHP script with GET parameters like:
          > https://xxxxxxxxxx/xxxxx/php_script.php?E:snddata.php&d=profe
          > the call to the php script is ok, i'm saving some text to a log file on
          > the server so i know the request is comming ok.
          >
          >
          > Can you give me a light about it?
          >
          > Thanks in advance
          >
          >

          • 2. Re: HTTPService and HTTPS problem
            Level 7
            Solved!!

            Just add headers:
            ...
            var headers:Array = new Array("Accept-Encoding", "deflate");
            hs.headers=headers;
            ...
            hs.send();




            >> * The routine who make the request:
            >> hs=new HTTPService(null);
            >> hs.resultFormat='object';
            >> var t:Array=PATH_PROFESION.split('?');
            >> if(t[1]!=undefined){
            >> hs.url=t[0]+'?'+encodeURIComponent(t[1]);
            >> }else{
            >> hs.url=PATH_PROFESION;
            >> }
            >> hs.destination="DefaultHTTPS";
            >> hs.method='GET';
            >> hs.useProxy=false;
            >> hs.addEventListener("result",getResult_Profesion);
            >> hs.addEventListener("fault",getFault_Profesion);
            >> hs.send();





            ddanone escribió:
            > I've detected it's an Internet Explorer issue, whe i test it on Firefox
            > it works perfectly.
            >
            >
            >
            >
            > ddanone escribió:
            >> I've made an application with many HTTPService request, it runs
            >> perfectly when urls are HTTP://....
            >> i've replaced all HTTP requests to HTTPS request and uploaded to an
            >> HTTPS server then i get the following error on fault event:
            >> ....
            >> ....Error #2032: Sequence Error...
            >> faultString="HTTP Request Error"
            >> ....
            >>
            >> * The application uses spanish characters so it has '<?xml
            >> version="1.0" encoding="iso-8859-1"?>' at the begining of the main
            >> mxml file.
            >>
            >> * The crossdomain file contains:
            >> <?xml version="1.0"?>
            >> <!DOCTYPE cross-domain-policy SYSTEM
            >> " http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
            >> <cross-domain-policy>
            >> <allow-access-from domain="*" />
            >> </cross-domain-policy>
            >>
            >> * The routine who make the request:
            >> hs=new HTTPService(null);
            >> hs.resultFormat='object';
            >> var t:Array=PATH_PROFESION.split('?');
            >> if(t[1]!=undefined){
            >> hs.url=t[0]+'?'+encodeURIComponent(t[1]);
            >> }else{
            >> hs.url=PATH_PROFESION;
            >> }
            >> hs.destination="DefaultHTTPS";
            >> hs.method='GET';
            >> hs.useProxy=false;
            >> hs.addEventListener("result",getResult_Profesion);
            >> hs.addEventListener("fault",getFault_Profesion);
            >> hs.send();
            >>
            >> * The final url is a PHP script with GET parameters like:
            >> https://xxxxxxxxxx/xxxxx/php_script.php?E:snddata.php&d=profe
            >> the call to the php script is ok, i'm saving some text to a log file
            >> on the server so i know the request is comming ok.
            >>
            >>
            >> Can you give me a light about it?
            >>
            >> Thanks in advance
            >>
            >>
            >
            >

            • 3. Re: HTTPService and HTTPS problem
              Level 7
              Sorry, not solved, ignore last post.

              :(

              ddanone escribió:
              > Solved!!
              >
              > Just add headers:
              > ....
              > var headers:Array = new Array("Accept-Encoding", "deflate");
              > hs.headers=headers;
              > ....
              > hs.send();
              >
              >
              >
              >
              > >> * The routine who make the request:
              > >> hs=new HTTPService(null);
              > >> hs.resultFormat='object';
              > >> var t:Array=PATH_PROFESION.split('?');
              > >> if(t[1]!=undefined){
              > >> hs.url=t[0]+'?'+encodeURIComponent(t[1]);
              > >> }else{
              > >> hs.url=PATH_PROFESION;
              > >> }
              > >> hs.destination="DefaultHTTPS";
              > >> hs.method='GET';
              > >> hs.useProxy=false;
              > >> hs.addEventListener("result",getResult_Profesion);
              > >> hs.addEventListener("fault",getFault_Profesion);
              > >> hs.send();
              >
              >
              >
              >
              >
              > ddanone escribió:
              >> I've detected it's an Internet Explorer issue, whe i test it on
              >> Firefox it works perfectly.
              >>
              >>
              >>
              >>
              >> ddanone escribió:
              >>> I've made an application with many HTTPService request, it runs
              >>> perfectly when urls are HTTP://....
              >>> i've replaced all HTTP requests to HTTPS request and uploaded to an
              >>> HTTPS server then i get the following error on fault event:
              >>> ....
              >>> ....Error #2032: Sequence Error...
              >>> faultString="HTTP Request Error"
              >>> ....
              >>>
              >>> * The application uses spanish characters so it has '<?xml
              >>> version="1.0" encoding="iso-8859-1"?>' at the begining of the main
              >>> mxml file.
              >>>
              >>> * The crossdomain file contains:
              >>> <?xml version="1.0"?>
              >>> <!DOCTYPE cross-domain-policy SYSTEM
              >>> " http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
              >>> <cross-domain-policy>
              >>> <allow-access-from domain="*" />
              >>> </cross-domain-policy>
              >>>
              >>> * The routine who make the request:
              >>> hs=new HTTPService(null);
              >>> hs.resultFormat='object';
              >>> var t:Array=PATH_PROFESION.split('?');
              >>> if(t[1]!=undefined){
              >>> hs.url=t[0]+'?'+encodeURIComponent(t[1]);
              >>> }else{
              >>> hs.url=PATH_PROFESION;
              >>> }
              >>> hs.destination="DefaultHTTPS";
              >>> hs.method='GET';
              >>> hs.useProxy=false;
              >>> hs.addEventListener("result",getResult_Profesion);
              >>> hs.addEventListener("fault",getFault_Profesion);
              >>> hs.send();
              >>>
              >>> * The final url is a PHP script with GET parameters like:
              >>> https://xxxxxxxxxx/xxxxx/php_script.php?E:snddata.php&d=profe
              >>> the call to the php script is ok, i'm saving some text to a log file
              >>> on the server so i know the request is comming ok.
              >>>
              >>>
              >>> Can you give me a light about it?
              >>>
              >>> Thanks in advance
              >>>
              >>>
              >>
              >>
              >
              >

              • 4. Re: HTTPService and HTTPS problem
                Level 7
                Finally works!! :) It's not a Flex/Flash problem or HTTPS Certificate,
                simply add the following headers to the php script:

                <?php
                header('Pragma: private');
                header('Cache-control: private, must-revalidate');
                ....
                ....
                ?>




                ddanone escribió:
                > I've detected it's an Internet Explorer issue, whe i test it on Firefox
                > it works perfectly.
                >
                >
                >
                >
                > ddanone escribió:
                >> I've made an application with many HTTPService request, it runs
                >> perfectly when urls are HTTP://....
                >> i've replaced all HTTP requests to HTTPS request and uploaded to an
                >> HTTPS server then i get the following error on fault event:
                >> ....
                >> ....Error #2032: Sequence Error...
                >> faultString="HTTP Request Error"
                >> ....
                >>
                >> * The application uses spanish characters so it has '<?xml
                >> version="1.0" encoding="iso-8859-1"?>' at the begining of the main
                >> mxml file.
                >>
                >> * The crossdomain file contains:
                >> <?xml version="1.0"?>
                >> <!DOCTYPE cross-domain-policy SYSTEM
                >> " http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
                >> <cross-domain-policy>
                >> <allow-access-from domain="*" />
                >> </cross-domain-policy>
                >>
                >> * The routine who make the request:
                >> hs=new HTTPService(null);
                >> hs.resultFormat='object';
                >> var t:Array=PATH_PROFESION.split('?');
                >> if(t[1]!=undefined){
                >> hs.url=t[0]+'?'+encodeURIComponent(t[1]);
                >> }else{
                >> hs.url=PATH_PROFESION;
                >> }
                >> hs.destination="DefaultHTTPS";
                >> hs.method='GET';
                >> hs.useProxy=false;
                >> hs.addEventListener("result",getResult_Profesion);
                >> hs.addEventListener("fault",getFault_Profesion);
                >> hs.send();
                >>
                >> * The final url is a PHP script with GET parameters like:
                >> https://xxxxxxxxxx/xxxxx/php_script.php?E:snddata.php&d=profe
                >> the call to the php script is ok, i'm saving some text to a log file
                >> on the server so i know the request is comming ok.
                >>
                >>
                >> Can you give me a light about it?
                >>
                >> Thanks in advance
                >>
                >>
                >
                >