[Mongrel] dealing with multipart forms in a Mongrel::HttpHandler

Ezra Zygmuntowicz ezmobius at gmail.com
Thu Dec 21 16:58:06 EST 2006

On Dec 21, 2006, at 12:56 PM, Mark wrote:

> Hi everyone,
> Is there an easy way to parse multipart form requests from within a  
> Mongrel::HttpHandler subclass or do I need to break out RFC 2388  
> and a bunch of regexps?
> Thanks,
> Mark

Hey Mark-

	There is nothing in mongrel to do that for you right now. You can  
either use the cgi.rb library(yuck!) or you can parse it yourself.  
You can look at how I do it in merb which is a take off on how  
camping does it but with some enhancements. You also might want to  
look at how the serverside gem does the mime parsing.

The initialize method here parses the incoming mime stuff including  
file uploads or multi part forms:


-- Ezra Zygmuntowicz 
-- Lead Rails Evangelist
-- ez at engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)

More information about the Mongrel-users mailing list