about summary refs log tree commit homepage
path: root/lib/mongrel/rails.rb
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-07-13 22:34:59 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-07-13 22:34:59 +0000
commitab3c8082de82e6fc96838d444be06432620743ab (patch)
tree4b6324ed627ff4083a61f5c011500ee41893e238 /lib/mongrel/rails.rb
parenta24136cd55995b748e3fed0db382f20cd49a315e (diff)
downloadunicorn-ab3c8082de82e6fc96838d444be06432620743ab.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@292 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel/rails.rb')
-rw-r--r--lib/mongrel/rails.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/mongrel/rails.rb b/lib/mongrel/rails.rb
index df4397a..859013b 100644
--- a/lib/mongrel/rails.rb
+++ b/lib/mongrel/rails.rb
@@ -77,7 +77,7 @@ module Mongrel
           rescue Errno::EPIPE
             # ignored
           rescue Object => rails_error
-            STDERR.puts "Error calling Dispatcher.dispatch #{rails_error.inspect}"
+            STDERR.puts "#{Tim.now}: Error calling Dispatcher.dispatch #{rails_error.inspect}"
             STDERR.puts rails_error.backtrace.join("\n")
           ensure
             @guard.unlock unless ActionController::Base.allow_concurrency
@@ -136,6 +136,7 @@ module Mongrel
         ops[:environment] ||= "development"
         ops[:docroot] ||= "public"
         ops[:mime] ||= {}
+        ops[:prefix] ||= "/"
 
 
         $orig_dollar_quote = $".clone
@@ -148,6 +149,9 @@ module Mongrel
         if ActionController::Base.allow_concurrency
           log "[RAILS] ActionController::Base.allow_concurrency is true.  Wow, you're very brave."
         end
+
+        ActionController::AbstractRequest.relative_url_root = ops[:prefix]
+
         @rails_handler = RailsHandler.new(ops[:docroot], ops[:mime])
       end