Content-Length header and Internal Server Error

Irpk0r

New Member
I have a PHP-driven website that uses output buffering, generates the entire page and spits out a couple of headers (\[code\]Content-Type\[/code\] and \[code\]Content-Length\[/code\]) before sending the actual page contents.This works fine on my local Apache server but as soon as I uploaded it to my web host (also Apache), it failed with a 500 Internal Server Error, which I finally traced to the \[code\]Content-Length\[/code\] header. I simply removed the header (it isn't really important) and it works fine since.Now I'm just curious as to why this happened in the first place - is there some kind of server setting that disallows scripts from adding this specific header?
 
Back
Top