Skip to content
Browse files

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
  • Loading branch information...
1 parent 7bba658 commit 11a5492791e6ed467a73bf20e0c7b6828bf0a3e2 @dhh dhh committed Mar 22, 2005
Showing with 7 additions and 2 deletions.
  1. +4 −0 railties/CHANGELOG
  2. +2 −2 railties/configs/apache.conf
  3. +1 −0 railties/lib/webrick_server.rb
View
4 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]
View
4 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
View
1 railties/lib/webrick_server.rb
@@ -69,6 +69,7 @@ def remove_dot_html(req)
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

0 comments on commit 11a5492

Please sign in to comment.
Something went wrong with that request. Please try again.