Changeset 5272
- Timestamp:
- 10/09/06 19:14:11 (2 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/request.rb (modified) (1 diff)
- trunk/actionpack/test/controller/request_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r5268 r5272 1 1 *SVN* 2 3 * Fix relative URL root matching problems. [Mark Imbriaco] 2 4 3 5 * Fix filter skipping in controller subclasses. #5949, #6297, #6299 [Martin Emde] trunk/actionpack/lib/action_controller/request.rb
r4644 r5272 162 162 163 163 # Cut off the path to the installation directory if given 164 root = relative_url_root 165 path[0, root.length] = '' if root 166 path || '' 167 end 168 164 path.sub!(%r/^#{relative_url_root}/, '') 165 path || '' 166 end 167 169 168 # Returns the path minus the web server relative installation directory. 170 169 # This can be set with the environment variable RAILS_RELATIVE_URL_ROOT. trunk/actionpack/test/controller/request_test.rb
r4644 r5272 208 208 assert_equal "/hieraki/", @request.request_uri 209 209 assert_equal "/", @request.path 210 211 @request.set_REQUEST_URI '/hieraki/dispatch.cgi' 212 @request.relative_url_root = '/hieraki' 213 assert_equal "/dispatch.cgi", @request.path 214 @request.relative_url_root = nil 215 216 @request.set_REQUEST_URI '/hieraki/dispatch.cgi' 217 @request.relative_url_root = '/foo' 218 assert_equal "/hieraki/dispatch.cgi", @request.path 219 @request.relative_url_root = nil 210 220 211 221 # This test ensures that Rails uses REQUEST_URI over PATH_INFO