aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/redirecting.rb
Commit message (Collapse)AuthorAgeFilesLines
* remove RackDelegation moduleAaron Patterson2015-08-261-1/+0
| | | | | | Since all controller instances are required to have a request and response object, RackDelegation is no longer needed (we always have to delegate to the response)
* refactor Redirecting so we do not need a controller instanceAaron Patterson2014-08-061-3/+5
|
* Don't accept parameters as argument for redirect to [via @homakov]Santiago Pastorino2014-07-161-0/+1
| | | | Closes #16170
* eliminate wasteful AS::SafeBuffer allocationAaron Patterson2014-06-061-1/+1
|
* fix formatting and text for ActionController::Redirecting docLaurel Fan2014-05-211-4/+8
|
* Fix syntax error in redirect_to examplePhilipe Fatio2013-12-141-1/+1
| | | | | Without parenthesis, ruby assumes that curly braces denote the beginning of a block.
* Fix regex used to find URI schemes in redirect_toDerek Prior2013-09-191-1/+1
| | | | | The previous regex was allowing `_` in the URI scheme, which is not allowed by RFC 3986. This change brings the regex in line with the RFC.
* Fix incorrect assert_redirected_to failure messageDerek Prior2013-09-191-19/+20
| | | | | | | | | | | | | | | In some instances, `assert_redirected_to` assertion was returning an incorrect and misleading failure message when the assertion failed. This was due to a disconnect in how the assertion computes the redirect string for the failure message and how `redirect_to` computes the string that is actually used for redirection. I made the `_compute_redirect_to_loaction` method used by `redirect_to` public and call that from the method `assert_redirect_to` uses to calculate the URL. The reveals a new test failure due to the regex used by `_compute_redirect_to_location` allow `_` in the URL scheme.
* Use \A in RegexpsEgor Homakov2013-02-011-1/+1
| | | | | So, if there is redirect_to params[:q] i can send ?q=javascript:asdf()%0A/localpath Or something more nasty, so please use \A
* Revert "log at debug level what line caused the redirect_to"Carlos Antonio da Silva2013-01-151-1/+0
| | | | | | | | This reverts commit 3fa00070047b5d019d39e691598ee2890283d052. Reason: This message is usually not accurate and annoying: Redirected by ~/.rbenv/versions/1.9.3-p327-perf/lib/ruby/1.9.1/logger.rb:371:in `add'`
* HTTP 302 means Found, not MovedChase DuBois2013-01-051-1/+1
|
* Refactor helpers code in Action Pack a bitCarlos Antonio da Silva2012-12-131-2/+1
| | | | | | | | * Avoid calling class_eval when not needed * Remove helpers_path attr accessor, it's defined as a class attribute a few lines later * Avoid creating extra arrays when finding helpers, use flat_map and sort! * Remove not required refer variable when redirecting :back
* Remove not used variable warnings from AM and ACCarlos Antonio da Silva2012-12-111-1/+1
|
* Multiple changes to 1,9 hash syntaxAvnerCohen2012-10-271-11/+11
|
* Merge pull request #2237 from jackdempsey/log_redirect_toAaron Patterson2012-05-161-0/+1
|\ | | | | log at debug level what line caused the redirect_to
| * log at debug level what line caused the redirect_toJack Dempsey2012-05-161-0/+1
| |
* | Removing ==Examples and last blank lines of docs from actionpackFrancesco Rodriguez2012-05-151-4/+0
| |
* | Add note about using 303 See Other for XHR requests other than GET/POSTAndrew White2012-04-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IE since version 6 and recently Chrome and Firefox have started following 302 redirects from XHR requests other than GET/POST using the original request method. This can lead to DELETE requests being redirected amongst other things. Although it doesn't directly affect the Rails framework since it doesn't return a 302 redirect to any non-GET/POST request a note has been added to raise awareness of the issue. Some references: Original article from @technoweenie: http://techno-weenie.net/2011/8/19/ie9-deletes-stuff/ Hacker News discussion of the article: http://news.ycombinator.com/item?id=2903493 WebKit bug report: https://bugs.webkit.org/show_bug.cgi?id=46183 Firefox bug report and changeset: https://bugzilla.mozilla.org/show_bug.cgi?id=598304 https://hg.mozilla.org/mozilla-central/rev/9525d7e2d20d Chrome bug report: http://code.google.com/p/chromium/issues/detail?id=56373 HTTPbis bug report and changeset: http://trac.tools.ietf.org/wg/httpbis/trac/ticket/160 http://trac.tools.ietf.org/wg/httpbis/trac/changeset/1428 Roy T. Fielding's history of the issue: http://ftp.ics.uci.edu/pub/ietf/http/hypermail/1997q3/0611.html Automated browser tests for the issue: http://www.mnot.net/javascript/xmlhttprequest/ Fixes #4144
* | Updated/changed useless tr/gsubsJurriaan Pruis2012-04-031-1/+1
| |
* | strip null bytes from Location header as wellBrian Lopez2012-03-151-1/+1
| | | | | | | | add tests for stripping \r\n chars since that's already happening
* | Minor enhancement by not unnecessarely escaping forward slashing within a ↵Overbryd2011-12-051-1/+2
| | | | | | | | curly regexp and by mentoining the protocol relative scheme in the internal comment
* | Fix for redirect_to to respect urls with a network path reference like ↵Overbryd2011-12-051-2/+2
| | | | | | | | "//asset.host.com/resources/1235" see issue #3856
* | add namespacing when referring to ActionController::RedirectBackErrorNick Howard2011-10-251-2/+2
| |
* | if ... nil? is more expensive than unlessMilan Dobrota2011-09-041-1/+1
| |
* | ActionController::Redirecting : fix docs typodharmatech2011-08-201-1/+1
|/
* Tweak linebreak in ActionController::Redirecting docChristine Yen2011-06-151-2/+2
|
* Improve documentation around status code argument of redirect_toChristine Yen2011-06-151-1/+2
|
* There is no need to use instance_eval since the proc is created in the same ↵José Valim2010-09-241-1/+1
| | | | context it is eval'ed.
* Make redirect_to accept blocks [#5643 state:resolved]Nando Vieira2010-09-241-1/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Adding linkage to redirect_to from Base and adding status code option referenceMikel Lindsaar2010-09-091-2/+4
|
* Revert "Setup explicit requires for files with exceptions. Removed them from ↵José Valim2010-09-021-2/+0
| | | | | | | | autoloading." Booting a new Rails application does not work after this commit [#5359 state:open] This reverts commit 38a421b34d0b414564e919f67d339fac067a56e6.
* Setup explicit requires for files with exceptions. Removed them from ↵Łukasz Strzałkowski2010-09-021-0/+2
| | | | | | autoloading. Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove some 1.9 warnings (resulting in some fixed bugs). Remaining AM ↵wycats2010-03-171-1/+1
| | | | warnings are in dependencies.
* Including UrlFor in Redirecting and Head will warn usefully if a controller ↵Carlhuda2010-02-261-3/+1
| | | | is wired up without a router included (and still support redirect_to "omg")
* WIP: Remove the global routerCarlhuda2010-02-251-1/+3
|
* Include missing modules.José Valim2010-02-221-0/+1
|
* Add subscriber for ActionPack and move all logging inside it.José Valim2010-01-131-2/+0
|
* Remove duplicated url_for code and move methods shared between ActionMailer ↵José Valim2010-01-071-0/+2
| | | | and ActionController up to AbstractController.
* AD::StatusCodes support is now part of rackJoshua Peek2009-12-221-4/+4
|
* AC::Head now doesn't have an unfulfilled Rendering dependency, and instead ↵Yehuda Katz2009-12-201-10/+2
| | | | works just fine standalone (which means that ConditionalGet also doesn't have a Rendering dependency)
* Renamed Redirector to Redirecting (its a module, not a class)David Heinemeier Hansson2009-12-201-0/+98