Rails: Malformed Header From Script

If you developed your application with WebBrick, deployed it to Apache and seeing something like below in your web server error log, make sure to check that you don’t have any output to console (like ‘puts’) left in the code.

[Sat Jul 28 07:11:05 2007] [error] [client] malformed header from script. Bad header=["a"]: dispatch.fcgi

Whatever you output goes to the header section of the response and most probably the web server won’t understand it.