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
This commit is contained in:
parent
7bba658200
commit
11a5492791
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user