search for: can_serv

Displaying 7 results from an estimated 7 matches for "can_serv".

Did you mean: can_serve
2007 Oct 19
0
X-Sendfile, static files, windows
...ngrel/handlers.rb contains class DirHandler. I added two things, first to initialize: def initialize(path, listing_allowed=true, index_html="index.html") @abs = path == "/" # Absolute paths are allowed @path = File.expand_path(path) ... next to method can_serve, which should start with this: def can_serve(path_info) req_path = HttpRequest.unescape(path_info) # Add path prefix, except to absolute Windows paths: req_path = File.join(@path,req_path) if (!@abs || req_path =~ % r{\a[A-Z]:[/^\\]}i) # Expand it to an absolute...
2007 Aug 10
1
serving static files
It seems that Merb is sending static files with Mongrel::DirHandler. (mongrel_handler.rb:52) if get_or_head and @files.can_serve(path_info) # File exists as-is so serve it up MERB_LOGGER.info("Serving static file: #{path_info}") @files.process(request,response) I haven''t done benchmarks and I''ve hardly glanced at DirHandler''s code but the comment on DirHandler#send_fil...
2006 Nov 04
0
page caching urls with space characters broken in webrick and mongrel
...''+'' (and ''%20'' is also normalized to a ''+'' in the cache file filename), but this code converts them to an actual space character which then means the cache files are always incorrectly overlooked. Similar line in mongrel''s handlers.rb can_serve(): req_path = File.expand_path(File.join(@path,HttpRequest.unescape(path_info)), @path) where unescaping the path turns the ''+'' into a '' ''. - Walter Korman -- http://www.lemurware.com --~--~---------~--~----~------------~-------~--~----~ You received...
2006 Jul 28
0
URL root/serving more than one app per subdomain
...less @urlroot.nil? or path_info[0, at urlroot.length]! =@urlroot and in handlers.rb / DirHandler#process path_info = request.params[Const::PATH_INFO] path_info = path_info[urlroot.length,path_info.length- urlroot.length] unless urlroot.nil? or path_info[0,urlroot.length]! =urlroot req_path = can_serve path_info I imagine there are other places where such a parameter might need to be added to get serving things other than rails apps to work right. I also didn''t try to add it to the Windows service binaries. So, I guess my question is twofold: 1) I''m new to making changes...
2006 Dec 27
3
Multiple DocRoots
I''m wondering if it''s possible to setup mongrel to have multiple document roots? The use case I''m trying to solve is one where I have a library of shared CSS/JS/Images and would like multiple rails application to use them. I have written a proxy controller and added some routes to serve the static files and it works reasonably well, but is extremely slow, because
2006 Oct 31
12
Moving page_cache_directory
Howdy. I''m working on a RoR CMS and need cached pages to all be in public/cache rather than public [in order to set svn:ignore on all the files properly]. I can get page_cache_directory set correctly and the pages are cached in the right place but Mongrel isn''t serving them because it''s only looking for them in public. During development I know I can set -r public/cache
2007 Sep 18
10
Routes
hi all, I want to move some routing tasks out of the router and into the controller. The goal is to make Merb feel less like mod_rewrite and give the user more control at the controller. The new Router is simple: it takes the path_info (not the whole request) then outputs a controller class and some parameters from the path matching. The rest of the routing would be done at the controller level.