aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-22 12:11:43 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-22 12:11:43 +0000
commit11a5492791e6ed467a73bf20e0c7b6828bf0a3e2 (patch)
tree2f2539e73f691d2410b8a6e6d6ae6e8b61a9ea91 /railties
parent7bba658200dec66944109e87e4908303b3b5b795 (diff)
downloadrails-11a5492791e6ed467a73bf20e0c7b6828bf0a3e2.tar.gz
rails-11a5492791e6ed467a73bf20e0c7b6828bf0a3e2.tar.bz2
rails-11a5492791e6ed467a73bf20e0c7b6828bf0a3e2.zip
Removed SCRIPT_NAME from the WEBrick environment to prevent conflicts with PATH_INFO #896 [Nicholas Seckar] Removed ? from the dispatch.f/cgi redirect line to get rid of 'complete/path/from/request.html' => nil being in the @params now that the ENV[REQUEST_URI] is used to determine the path #895 [dblack/Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@972 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG4
-rwxr-xr-xrailties/configs/apache.conf4
-rw-r--r--railties/lib/webrick_server.rb1
3 files changed, 7 insertions, 2 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index ce3eabcec6..b41771ced1 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,9 @@
*SVN*
+* Removed SCRIPT_NAME from the WEBrick environment to prevent conflicts with PATH_INFO #896 [Nicholas Seckar]
+
+* Removed ?$1 from the dispatch.f/cgi redirect line to get rid of 'complete/path/from/request.html' => nil being in the @params now that the ENV["REQUEST_URI"] is used to determine the path #895 [dblack/Nicholas Seckar]
+
* Added additional error handling to the FastCGI dispatcher to catch even errors taking down the entire process
* Improved the generated scaffold code a lot to take advantage of recent Rails developments #882 [Tobias Luetke]
diff --git a/railties/configs/apache.conf b/railties/configs/apache.conf
index f24e1753fc..bf24511506 100755
--- a/railties/configs/apache.conf
+++ b/railties/configs/apache.conf
@@ -9,12 +9,12 @@ Options +FollowSymLinks +ExecCGI
# For better performance replace the dispatcher with the fastcgi one
#
# Example:
-# RewriteRule ^(.*)$ dispatch.fcgi?$1 [QSA,L]
+# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule ^(.*)$ dispatch.cgi?$1 [QSA,L]
+RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
# In case Rails experiences terminal errors
# Instead of displaying this message you can supply a file here which will be rendered instead
diff --git a/railties/lib/webrick_server.rb b/railties/lib/webrick_server.rb
index cc45867128..43acffab86 100644
--- a/railties/lib/webrick_server.rb
+++ b/railties/lib/webrick_server.rb
@@ -69,6 +69,7 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet
def handle_dispatch(req, res, origin = nil)
env = req.meta_vars.clone
+ env.delete "SCRIPT_NAME"
env["QUERY_STRING"] = req.request_uri.query
env["REQUEST_URI"] = origin if origin