Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

up vote 3 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

 
discard

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.