Flex的进展情况bytesTotal的在Linux中,则返回0进展情况、Flex、Linux、bytesTotal

由网友(败一人)分享简介:我使用的URLLoader加载一个远程文件。里面的progressevent我试图采取的bytesLoaded和bytesTotal从progressevent。I am using URLLoader to load a remote file. Inside the progressevent I tried t...

我使用的URLLoader加载一个远程文件。里面的progressevent我试图采取的bytesLoaded和bytesTotal从progressevent。

I am using URLLoader to load a remote file. Inside the progressevent I tried to take the bytesLoaded and bytesTotal from the progressevent.

两者都工作正常,在Windows Server

Both are working fine in a windows server

但是,如果一台Linux服务器已配置bytesTotal的一些代理返回0和的bytesLoaded返回正确的值如常。任何人都知道问题是什么?我们需要配置一些代理或Linux的服务器内,以获得totalbytes?

But in case of a linux server that have some proxies configured bytesTotal returns 0 and bytesLoaded returns the correct value as usual. Anybody know what the issue is? Do we need to configure something inside the proxy or the linux server to get the totalbytes?

推荐答案

获取0 bytesTotal的表示响应被发来的的块传输。通常情况下,你看到这个当服务器没有设置Content-Length头。在你的情况下,它会出现代理可以不经过中继的响应时的内容长度。

Getting 0 for bytesTotal indicates the the response is being sent as a chunked transfer. Typically you see this when the server does not set the Content-length header. In your case, it would appear the proxy may not be passing the Content-length on when relaying the response.

当您收到引发Event.COMPLETE event.data 是接收的总字节长度。

When you receive the Event.COMPLETE, the length of event.data is the total bytes received.