On Sat, Feb 27, 2010 at 16:10, Derrell Lipman <
[email protected]> wrote:
> On Sat, Feb 27, 2010 at 15:42, Jörg Sawatzki <[email protected]>wrote:
>
>> Hey Derrell,
>>
>> thanks a lot for your support! Now the status codes are handled
>> correctly.
>> Unfortunately, the setParameter thing is ignored - doing
>> r.setParameter("name", name, true) (according to the docs this is the
>> correct oder, but I tried name, "name" as well). The POST data is just
>> empty - this is what both firebug and my server say.
>> This is with .setProhibitCaching(false) - if it is enabled, the POST
>> data contains only the nocache parameter.
>>
>> Any idea what's going on here?
>>
>
> Something appears broken. For the time being, you can create your POST data
> explicitly, especially if you have only that one type and value (name). Use
> request.setData() to provide the entire POST data string exactly as it
> should be sent. In this case, you can remove the setParameter() call.
>
I'm not set up to test this easily, but would you please try the attached
patch, change your setData back to using setParameter, and see if this fixes
the problem?
Thanks!
Derrell
diff --git a/qooxdoo/framework/source/class/qx/io/remote/Exchange.js b/qooxdoo/framework/source/class/qx/io/remote/Exchange.js
index 2e8cab9..9038adc 100644
--- a/qooxdoo/framework/source/class/qx/io/remote/Exchange.js
+++ b/qooxdoo/framework/source/class/qx/io/remote/Exchange.js
@@ -839,10 +839,45 @@ qx.Class.define("qx.io.remote.Exchange",
value.setUsername(vRequest.getUsername());
value.setPassword(vRequest.getPassword());
- value.setParameters(vRequest.getParameters());
+ value.setParameters(vRequest.getParameters(false));
value.setFormFields(vRequest.getFormFields());
value.setRequestHeaders(vRequest.getRequestHeaders());
- value.setData(vRequest.getData());
+ var data = vRequest.getData();
+ if (data === null)
+ {
+ var vParameters = vRequest.getParameters(true);
+ var vParametersList = [];
+
+ for (var vId in vParameters)
+ {
+ var paramValue = vParameters[vId];
+
+ if (paramValue instanceof Array)
+ {
+ for (var i=0; i<paramValue.length; i++)
+ {
+ vParametersList.push(encodeURIComponent(vId) +
+ "=" +
+ encodeURIComponent(paramValue[i]));
+ }
+ }
+ else
+ {
+ vParametersList.push(encodeURIComponent(vId) +
+ "=" +
+ encodeURIComponent(paramValue));
+ }
+ }
+
+ if (vParametersList.length > 0)
+ {
+ value.setData(vParametersList.join("&"));
+ }
+ }
+ else
+ {
+ value.setData(data);
+ }
value.setResponseType(vRequest.getResponseType());
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel