Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-27222

http.requestTimeout silently switches the request from a POST to a GET

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 3.5 (Release)
    • None
    • RPC: HTTPService
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      If you set the http.requestTimeout method, it will silently ignore the fact you asked it to be a POST request and discards any and all headers.

      Also a known issue in Flex is that GET request have all headers dumped.

      Steps to reproduce:

      var http:HTTPService = new HTTPService()
      http = new HTTPService();
      http.method = "POST";
      var encoder:Base64Encoder = new Base64Encoder();
      encoder.insertNewLines = false;
      encoder.encode(login.username + ":" + login.password);
      http.headers =

      {Authorization:"Basic " + encoder.toString()}

      ;
      http.resultFormat = "text";
      http.addEventListener(ResultEvent.RESULT, resultHandler);
      http.addEventListener(FaultEvent.FAULT, resultHandler);
      http.url = "http://www.example.com/post;

      //http.requestTimeout = 5; //Watch out for this, enable it and it changes the request to GET & destroys the headers.

      http.method = "POST";
      http.send();

      Actual Results:

      changes the request to GET & destroys the headers.

      Expected Results:

      Leave the request as what I asked for, don't destroy the headers and timeout after 5 seconds if it can't connect.

      Workaround (if any):

      Leave the user sitting there, without any feedback if the application cannot connect.

      Further information:

      I am running the application as a sand-boxed SWF file, using the debugger and a packet capture application (wireshark).
      If you want a packet capture file, just ask and I'll send it over.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: