2

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 ?

4

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?

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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