Read Flex/Flash URL which has Transfer-Encoding chunked

感情迁移 提交于 2019-12-24 21:10:38

问题


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...


回答1:


Use the URLStream class instead of whatever loader you're using now. Its ProgressEvents will let you read chunks before the message completes.




回答2:


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



来源:https://stackoverflow.com/questions/3568168/read-flex-flash-url-which-has-transfer-encodingchunked

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!