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 ?

1 Answer 1

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?

1
  • 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, 2011 at 14:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .