class Mongrel::CGIWrapper

The beginning of a complete wrapper around Mongrel’s internal HTTP processing system but maintaining the original Ruby CGI module. Use this only as a crutch to get existing CGI based systems working. It should handle everything, but please notify me if you see special warnings. This work is still very alpha so I need testers to help work out the various corner cases.

The CGIWrapper.handler attribute is normally not set and is available for frameworks that need to get back to the handler. Rails uses this to give people access to the RailsHandler#files (DirHandler really) so they can look-up paths and do other things with the files managed there.

In Rails you can get the real file for a request with:

path = @request.cgi.handler.files.can_serve(@request['PATH_INFO'])

Which is ugly but does the job. Feel free to write a Rails helper for that. Refer to DirHandler#can_serve for more information on this.