[Mongrel] Announcing Monrel Raw Output
jchris at mfdz.com
Mon Nov 20 13:52:06 EST 2006
I've just posted a GemPlugin for Mongrel, which allows you to skip all
header and status-code generation, effectively hijacking the socket
for whatever your needs are, from inside the depths of any Rails,
Camping, Merb etc application.
gem install mongrel_raw_output
I use the plugin at work, where the client insists that testing
network processes actually go over a wire. So for testing remote APIs
we specify a mock server enpoint URL instead of the actual location.
That mock server is a Rails app which basically dispatches URLs to
chunks of data we saved using wget on the remote API. So our mock
server effectively mirrors the remote server.
This doesn't work with Mongrel putting its own headers onto the
response, because the responses we're saving with wget already have
headers. Enter mongrel_raw_output.
I know it's sort of and edge case that led me to write the plugin, but
I'm hoping it will come in handy for some of you. And please let me
know if you have any issues or questions when using it.
More information about the Mongrel-users