Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No Content-Length field in the HTTP response header (google app engine)

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?

like image 357
Max Avatar asked Jun 12 '10 20:06

Max


People also ask

How do I get the Content Length of a HTTP header?

To check this Content-Length in action go to Inspect Element -> Network check the request header for Content-Length like below, Content-Length is highlighted.

Is Content Length required in HTTP response?

The Content-Length is optional in an HTTP request. For a GET or DELETE the length must be zero. For POST, if Content-Length is specified and it does not match the length of the message-line, the message is either truncated, or padded with nulls to the specified length.

Is Content Length header required request?

The Content-Length header is mandatory for messages with entity bodies, unless the message is transported using chunked encoding. Content-Length is needed to detect premature message truncation when servers crash and to properly segment messages that share a persistent connection.

What is Content Length in post HTTP?

14.13 Content-Length The Content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET.


1 Answers

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?

like image 69
Nick Johnson Avatar answered Sep 28 '22 07:09

Nick Johnson