Here is a kludge that you might try out, to see if it helps diagnose or work
around your problem. It is a work-around for a horrible Flash bug, which
happens when you do a POST with more than 1024 characters in the body. This
code was written for lps-3.0.2, so your mileage may vary, and maybe it's
already been fixed. To diagnose if this is the problem, use LiveHeaders or
Fiddler to see if you're sending a post with >= 1024 characters. A correct
successful reply comes back from the server, but Laszlo never sees it
because there's an unexpected null src in the return value from Flash, so it
hangs the load queue until the timeout occurs and it gets flushed, which
sounds something like the symptoms you're experiencing.

        -Don

  <script><![CDATA[

      // This frightning kludge is necessary to work around a Flash bug
      // that imposes a 1024 character limit on the post body.
      // All of the parameters are making it to the server correctly,
      // and the correct reply comes back, but Flash returns a null
      // src argument instead of a string of xml.
      // That prints an error message and leaves the download queue blocked
      // until the timeout fires.
      // To work around the problem, we make a valid xml string to parse,
      /// and act like that's what was received.

      LzLoadQueue.serverlessOnDataHandler = function (src) {
          var xmlobj = this.xmlobj;

          // FOR DEBUGGING
          _root.qsrc = src;

          if (src == undefined) {
// Hack around Flash bug with 1024 character limit on post body.
//            _root.Debug.write("LzLoadQueue.serverlessOnDataHandler load
failed, no data received");
//            xmlobj.dataset.onerror.sendEvent(this.dataset);
            xmlobj.parseXML('<error result="-1"
from="LzLoadQueue.serverlessOnDataHandler"/>')
            xmlobj.xmltolzdata([xmlobj]);
            xmlobj.loader.returnData(xmlobj, xmlobj);
        } else {
            //_root.Debug.write("LzLoadQueue.serverlessOnDataHandler
success");
            // Create a queue containing one root node, myself, and convert
it and all children to
            // LzDataNodes.

            xmlobj.parseXML(src);
            xmlobj.xmltolzdata([xmlobj]);
            // TODO: [2005-02-16 hqm] We are using the xml obj as both the
            // request object and as the data tree itself.  It would
            // probably be smarter to use a special request object for this
            // task.
            xmlobj.loader.returnData(xmlobj, xmlobj);
        }
      }

    ]]>
  </script>



_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to