[Laszlo-dev] For Review: Change 20090410-hqm-S Summary: make postbody get transmitted, regardless of other query params

Henry Minsky henry.minsky at gmail.com
Fri Apr 10 11:09:11 PDT 2009


Change 20090410-hqm-S by hqm at badtzmaru.home on 2009-04-10 13:47:30 EDT
     in /Users/hqm/openlaszlo/trunk5/WEB-INF/lps/lfc
     for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc

Summary: make postbody get transmitted, regardless of other query params

New Features:

Bugs Fixed: LPP-8042

Technical Reviewer: a.bargull
QA Reviewer: ptw
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

+ Setting the postbody should always cause the raw data to be  
transmitted,
even in other query params have been set.

This implementation makes it so that setting postbody overrides any
query params, regardless of whether the call to set postbody comes
before or after the call set query params. Once postbody has been set,
the only way to disable it's action is to set postbody to null.

Tests:

run this in test/data

<canvas>
  <dataset name="foo" src="http:echoUTF8.jsp"
            request="false"
            ontimeout="Debug.write(this.name + ': timed out')"
            onerror="Debug.write(this.name + ': error')"
            ondata="Debug.write('Response: ' +  
this.getPointer().serialize())" >
   </dataset>

   <simplelayout/>
   <button text="post raw data">
     <handler name="onclick">
       foo.setAttribute('querytype', 'post');
       foo.setQueryParam('flavor', 'vanilla');
       foo.setAttribute('postbody', "This is a raw post body");
       foo.doRequest();
     </handler>
   </button>
</canvas>

The returned data from the server should indicate that only the  
postbody value was
sent

calling foo.doRequest() «<dataset>#1#0| #foo»
Response: <foo><response><formcomponent method="POST" name="This is a  
raw post body" hex=""></formcomponent></response></foo>

Files:
M      data/LzHTTPDataProvider.lzs
M      data/LzDataset.lzs

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090410-hqm-S.tar


More information about the Laszlo-dev mailing list