[Mongrel] how to translate request.params['PATH_INFO'] into physical file

Jeroen Houben jeroen at supercool.nl
Sun Mar 11 18:38:21 EDT 2007

Jeroen Houben wrote:
> Hi,
> What's the most reliable way to find out the physical file location when 
> given a request.params['PATH_INFO'] ?
> I guess I need to know mongrel's document_root or something similar.

Ah found something myself. This seems to work for me:

   def initialize(options = {})
     @observe_path = '/flvstream'
     @docroot      = options[:cwd] + "/" + options[:docroot]


More information about the Mongrel-users mailing list