diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-12-08 04:40:24 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-12-08 04:40:24 +0000 |
commit | c140e80fc4ca438cd966ec3b2453cb7bef91482b (patch) | |
tree | 780e0fab4ca752a64588f1e0a4d27db889988bd3 /actionpack/test | |
parent | c1537e89f89d1460e3b0fb0dc87d2a310afa3cbc (diff) | |
download | rails-c140e80fc4ca438cd966ec3b2453cb7bef91482b.tar.gz rails-c140e80fc4ca438cd966ec3b2453cb7bef91482b.tar.bz2 rails-c140e80fc4ca438cd966ec3b2453cb7bef91482b.zip |
More robust relative url root discovery for SCGI compatibility. This solves the 'SCGI routes problem' -- you no longer need to prefix all your routes with the name of the SCGI mountpoint. References #3070.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/request_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb index ecc056960c..f941857c48 100644 --- a/actionpack/test/controller/request_test.rb +++ b/actionpack/test/controller/request_test.rb @@ -100,6 +100,11 @@ class RequestTest < Test::Unit::TestCase @request.relative_url_root = nil @request.env['SCRIPT_NAME'] = "/collaboration/hieraki/dispatch.cgi" assert_equal "/collaboration/hieraki", @request.relative_url_root + + # apache/scgi case + @request.relative_url_root = nil + @request.env['SCRIPT_NAME'] = "/collaboration/hieraki" + assert_equal "/collaboration/hieraki", @request.relative_url_root end def test_request_uri |