Rails Error: Malformed header from script

If you are running your rails app on an Apache2+ mod_fcgid set up and you receive errors like

[Fri Aug 1 08:10:06 2008 [error] [client 111.222.333.444] malformed header from script. Bad header=*******: dispatch.fcgi

in the Apache error log, make sure you don’t have any output to console (like ‘puts’, added for debugging) left in the code.

Whatever the script output goes to the header section of the response and most of the times Apache won’t understand it.

Removing “puts” from the code helped me fix it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: