Getting total file length when using chunked http transfers

前提是你 提交于 2019-12-04 23:06:21

If the server provides a Content-Length header field, then that's easy. If it doesn't, then you're out of luck.

Reasonable server implementations provide Content-Length when the content is static and has a known size. If the content is dynamically generated, then it's impossible to know the length a priori, at least without making two passes through the data.

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