[Mongrel] apache2.2 mod_proxy, mongrel, and my poor rails code

hax hax at cheaphacks.info
Thu Aug 24 01:36:18 EDT 2006

Hi mongrel-users,

Just a heads up for apache2.2 mod_proxy + mongrel + rails users:

If you have a line like this in your source (because you've done a  
poor job maintaining your code and reading the API docs):
render 'foo', :layout => 'bar'

You might expect it to do what it says... but it actually sets  
deprecated_status and ends up setting "Status: layoutbar" as a header.

This wouldn't be a problem other than an RFC violation, if Apache  
didn't pick up on it and deliver anything with an invalid Status  
header as text/plain (as it should).  But it does it without warning  
(as it shouldn't), which I've told the #apache people about, and they  
say they'll patch in a debug message or something.

But for reference,

If your symptoms are:
- Mongrel == works
- Mongrel + Apache mod_proxy == fails
- Webrick + Apache mod_proxy == works
- Mongrel + Pen == works

Then check your status headers, as I could see this becoming a common  
mistake as more users do the switch to this configuration.

I hope it's okay for me to post something I consider 'informational'  
here, but it had me stumped for hours, and I figure others should  
know about it.

Hope thats helpful,


More information about the Mongrel-users mailing list