Data truncated

9 views
Skip to first unread message

Matt

unread,
Nov 20, 2008, 4:25:48 PM11/20/08
to AS3 HttpClient
Hi,

I'm new to using AS3HttpClient and I'm having an issue reading large
XML responses. A particular response is around 8000 charcters and is
getting truncated at around 7700 characters. My onData handler
function is only being called once with these characters and then my
onComplete is called. No errors are happening.

Anything shorter than this seems to work fine. I'm also fairly
certain is not the service thats producing the XML as it has been
working fine with other client applications.

Any idea what might be happening here or how I'm not using the
HttpClient correctly? Thanks.

Matt

mr

unread,
Dec 1, 2008, 8:30:59 AM12/1/08
to AS3 HttpClient
In an earlier post, I was trying to resolve a kind of inverse problem
earlier... how to access the aggregated data from the onComplete
event. I never encountered the problem you are descibing, and I always
get a series of data events fired correctly. Maybe if we could see the
code for the request, including the code for any handlers you specify,
we might be better able to tell what might be going wrong?

m.

gabe

unread,
Dec 2, 2008, 4:55:00 PM12/2/08
to AS3 HttpClient
Is there any other information you can give, like what type of web
server its connecting to?

Matt Helgren

unread,
Dec 2, 2008, 5:07:36 PM12/2/08
to as3-htt...@googlegroups.com
Well I did some troubleshooting and it looks my issue is that the
complete event and the data event were both being delivered at the
same time on two different threads. The complete event was processing
faster and finding incomplete data as the data event handler had not
delivered the final data. Is there a state machine in the HTTP
client that would prevent this scenario?

Matt
--
Matt

Gabe

unread,
Dec 2, 2008, 6:43:16 PM12/2/08
to as3-htt...@googlegroups.com
Is it possible that the complete event is firing _before_ all the data
has been received? The complete even should fire only after all the
data has been received, from receiving a zero size chunk if
Chunked-Encoding, or by receiving all the data of length specified in
Content-Length... It is possible there is a bug in the response
handling somewhere...

Is a Content-Length header being specified on the response?

Could I get the headers and content from curl or a tcpdump of the
data. Not sure how much I can help without being able to replicate.
Reply all
Reply to author
Forward
0 new messages