Jeroen Houben
2007-Mar-09 12:52 UTC
[Mongrel] how to translate request.params[''PATH_INFO''] into physical file
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. tia, Jeroen
Jeroen Houben
2007-Mar-11 22:38 UTC
[Mongrel] how to translate request.params[''PATH_INFO''] into physical file
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] end Jeroen