HTTP响应头中没有Content-Length字段(谷歌应用程序引擎) [英] No Content-Length field in the HTTP response header (google app engine)

查看:696
本文介绍了HTTP响应头中没有Content-Length字段(谷歌应用程序引擎)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试下载rar,exe,msi静态文件时,Content-Length标题丢失,尽管图像响应包含Content-Length,但如果将rar扩展名更改为jpg,则不会



我该如何解决这个问题?

解决方案

>你看到了吗?它可能是使用Transfer-Encoding提供的:Chunked,这是通过HTTP传输响应的完全合法的方式。

另外,你如何提供文件 - 使用静态文件,你的代码或blobstore?


Content-Length header is missing when I try to download rar, exe, msi static files, though response for images contains Content-Length, but if I change rar extension to jpg it doesn't.

How do I solve this?

解决方案

What headers do you see? It's possible it's being served using Transfer-Encoding: Chunked, which is a perfectly legitimate way of transferring responses over HTTP.

Also, how are you serving the file - using static files, your code, or the blobstore?

这篇关于HTTP响应头中没有Content-Length字段(谷歌应用程序引擎)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆