Read Flex/Flash URL which has Transfer-Encoding chunked
I have a problem reading from Flex a url which has Transfer-Encoding: chunked because the FLex waits for the server to send terminate signal which in chunked transfer isn't 开发者_如何学编程sent...
Use the URLStream class instead of whatever loader you're using now. Its ProgressEvents will let you read chunks before the message completes.
But if you read the documents a little more carefully, you will find the following. So it becomes clear, you just need to check the size of received chunks until it get ZERO.
The data transfer is terminated by a final chunk of length zero
精彩评论