Flex HttpService POST limited to 543 Byte per Form field?

Posted by motto on Stack Overflow See other posts from Stack Overflow or by motto
Published on 2010-03-12T19:19:15Z Indexed on 2010/03/13 21:35 UTC
Read the original article Hit count: 328

Filed under:
|
|
|
|

Hi,

I am getting a FaultEvent when trying to send form fields through HTTPService that contain more than 542 chars.

Initializing the HttpService:

httpServ = new HTTPService();
httpServ.method = 'POST';
httpServ.url = ENDPOINT_URL; //http://localhost:3001/ReportError.aspx
httpServ.resultFormat = HTTPService.RESULT_FORMAT_TEXT;
httpServ.contentType = HTTPService.CONTENT_TYPE_FORM;
httpServ.addEventListener(ResultEvent.RESULT, OnErrorSent);
httpServ.addEventListener(FaultEvent.FAULT, OnFault);

Sending the request:

var params:Object = {};         
//params["stack"] = e.stackTrace.slice(0, 542); //length 542 = works
//params["stack2"] = e.stackTrace.slice(1, 543); //length 542 = works (just to show that it's not about the content itself)
params["stack3"] = e.stackTrace.slice(0, 543); //length 543 = fails

I also seem to be able to create many form fields (with 542 length) so that it's not a limit of the request itself but of the form field:

var params:Object = {};         
params["stack"] = e.stackTrace.slice(0, 542); //length 542
params["stack2"] = e.stackTrace.slice(1, 543); //length 542
params["stack3"] = e.stackTrace.slice(2, 544); //length 542
// Length > 1600 chars

The receiving party is an ASP.NET 4 site on the same domain and port.

I hope someone already came across a similar restrictions or has some general advice on how to trace this problem down further.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about flex

Related posts about actionscript