Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a nginx server which serve a website. With my browser i can reach index.php, but when i look at the headers with firebug, i can't see the content-length on any php files, but for example i can see it on html files.

With a apache server, i can see this content-length on every type of file.

I use a loadbalancer that's why i need this parameter to be sent!

Have you ever had this kind of problem with nginx ?

share|improve this question
up vote 4 down vote accepted

This is chunked encoding (you'll see a Transfer-Encoding: chunked header), and understanding this encoding in place of Content-Length is a requirement for any HTTP/1.1-compliant application.

From the RFC: All HTTP/1.1 applications MUST be able to receive and decode the "chunked" transfer-coding.

nginx is behaving properly; if your load balancer can't handle it, but still acts like an HTTP/1.1 system, then it's the one to blame. What kind of load balancer is it?

share|improve this answer
Ok thanks for your help, My LB is the ec2 one. And i think that it is not able to decode the "chunked"... – Clabman Dec 21 '11 at 14:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.