aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/request_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add original_fullpath and original_url methods to RequestPiotr Sarnacki2011-12-211-0/+24
|
* add test for bug fixed in 4f2bf64Andre Arko2011-11-141-0/+5
|
* change tests to expect X-F-F over REMOTE_ADDRAndre Arko2011-11-131-2/+2
|
* :subdomain can now be specified with a value of false in url_for, allowing ↵Kamil Sobieraj2011-10-041-0/+1
| | | | for subdomain(s) removal from the host during link generation. Closes #2025
* Check Accept and Content-Type headers before evaluating them in xhr ↵ogeidix2011-07-191-0/+6
| | | | | | requests. Closes #2119 An xhr request must have an "Accept" or "Content-type" header in order to be considered a request with valid_accept_header.
* Logs should show overridden method; Issue 426David Lee2011-05-071-0/+7
|
* Fix .subdomain regression.José Valim2011-05-041-0/+9
|
* Koz asked to test something crazy.José Valim2011-05-021-0/+12
|
* Add ignore_accept_header config to AD::Request.José Valim2011-05-021-0/+22
|
* Filter sensitive query string parameters in the log [#6244 state:committed]Prem Sichanugrist & Xavier Noria2011-03-111-0/+38
| | | | | | This provides more safety to applications that put secret information in the query string, such as API keys or SSO tokens. Signed-off-by: Xavier Noria <fxn@hashref.com>
* cleaning up some warnings on 1.9.3Aaron Patterson2011-02-071-1/+1
|
* The redirect routing method now allows for a hash of options which only ↵Josh Kalderimis2010-11-301-0/+25
| | | | changes the relevant parts of the url, or an object which responds to call can be supplied so common redirect rules can be easily reused. This commit includes a change where url generation from parts has been moved to AD::Http::URL as a class method.
* port_string bought back to life as it is part of the public apiJosh Kalderimis2010-11-241-1/+9
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* :subdomain, :domain and :tld_length options can now be used in url_for, ↵Josh Kalderimis2010-11-231-3/+3
| | | | | | allowing for easy manipulation of the host during link generation. Signed-off-by: José Valim <jose.valim@gmail.com>
* Brought the domain method in AD http url inline with subdomain where ↵Josh Kalderimis2010-11-161-0/+3
| | | | @@tld_length is used by default. Also set the default value of @@tld_length to 1.
* make sure request parameters are accessible after rack throws an exception ↵Miles Egan2010-10-121-0/+12
| | | | | | parsing the query string [#3030 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Initialize @trusted_proxies.Emilio Tagua2010-09-281-0/+1
|
* Use parentheses when using assert_match followed by a regexp to avoid warnings.Emilio Tagua2010-09-271-3/+3
|
* Add configuration option for tld lengthSimon Jefford2010-09-091-0/+5
|
* Revert "Setup explicit requires for files with exceptions. Removed them from ↵José Valim2010-09-021-1/+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/+1
| | | | | | autoloading. Signed-off-by: José Valim <jose.valim@gmail.com>
* Don't add the standard https port when using redirect in routes.rb and ↵Andrew White2010-08-201-0/+36
| | | | | | | | ensure that request.scheme returns https when using a reverse proxy. [#5408 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* Extract ParameterFilter class from FilterParameters mixinBryan Helmkamp2010-07-191-4/+4
| | | | Signed-off-by: wycats <wycats@gmail.com>
* * Change the object used in routing constraints to be an instance ofwycats2010-04-031-6/+14
| | | | | | | | | | | ActionDispatch::Request rather than Rack::Request. * Changed ActionDispatch::Request#method to return a String, to be compatible with the Rack::Request superclass. * Changed ActionDispatch::Request#method to return the original method in the case of methodoverride and #request_method not to, to be compatible with Rack::Request
* Request#content_type exists in Rack::Request, and other parts of ↵wycats2010-03-281-4/+4
| | | | | | Rack::Request expect it to return a String. Split the Rails API so that Request#content_type returns a String, and Request#content_mime_type returns a Mime::Type object.
* Deprecate IP spoofing settings that are directly on the controller in favor ↵Carlhuda2010-03-031-2/+0
| | | | of configuring a middleware
* Move remote_ip to a middleware:Carlhuda2010-03-031-5/+7
| | | | | * ActionController::Base.ip_spoofing_check deprecated => config.action_dispatch.ip_spoofing_check * ActionController::Base.trusted_proxies deprecated => config.action_dispatch.trusted_proxies
* ActionController::Base.use_accept_header is not actually used anymore, so ↵Carl Lerche2010-03-031-7/+0
| | | | let's deprecate it.
* ActionDispatch::Request deprecates #request_uriCarl Lerche2010-03-031-15/+15
| | | | * Refactored ActionPatch to use fullpath instead
* Tweak the semantic of various URL related methods of ActionDispatch::RequestCarlhuda2010-03-031-78/+8
|
* Work on deprecating ActionController::Base.relative_url_rootCarlhuda2010-03-031-8/+0
|
* Add a tests which ensures filtered_parameters does not raise an error for a ↵José Valim2010-02-211-1/+1
| | | | mixed array [#3928 status:resolved]
* Make filter parameters based on request, so they can be modified for ↵José Valim2010-01-211-26/+13
| | | | anything in the middleware stack.
* Tidy up new filter_parameters implementation.José Valim2010-01-211-13/+42
|
* Move filter_parameter_logging logic out of the controller and create ↵Prem Sichanugrist2010-01-211-0/+34
| | | | | | ActionDispatch::ParametersFilter to handle parameter filteration instead. This will make filteration not depending on controller anymore. Signed-off-by: José Valim <jose.valim@gmail.com>
* Make HEAD method masquerade as GET so requests are routed correctlyJoshua Peek2010-01-151-2/+2
|
* Unknown :format param should result in empty request.formatsJeremy Kemper2009-11-081-0/+4
|
* Got tests to pass with some more changes.Yehuda Katz2009-08-151-33/+30
| | | | | | | | | | | | | | | | * request.formats is much simpler now * For XHRs or Accept headers with a single item, we use the Accept header * For other requests, we use params[:format] or fallback to HTML * This is primarily to work around the fact that browsers provide completely broken Accept headers, so we have to whitelist the few cases we can specifically isolate and treat other requests as coming from the browser * For APIs, we can support single-item Accept headers, which disambiguates from the browsers * Requests to an action that only has an XML template from the browser will no longer find the template. This worked previously because most browsers provide a catch-all */*, but this was mostly accidental behavior. If you want to serve XML, either use the :xml format in links, or explicitly specify the XML template: render "template.xml".
* Add some more caching to the lookupYehuda Katz2009-08-111-2/+2
|
* Allow to configure trusted proxies via ↵Felipe Talavera2009-08-091-0/+28
| | | | | | ActionController::Base.trusted_proxies [#2126 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ensure that the proper accept header value is set during tests.José Valim2009-07-291-28/+28
| | | | Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Improve request test coverage by adding formats and negotiate_mime tests.José Valim2009-07-291-0/+39
| | | | Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Switch to action_dispatch rack namespace Joshua Peek2009-04-301-1/+1
|
* Bring abstract_controller up to date with rails/masterCarl Lerche & Yehuda Katz2009-04-131-230/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list of commits that could not be applied cleanly or are obviated with the abstract_controller refactor. They all need to be revisited to ensure that fixes made in 2.3 do not reappear in 3.0: 2259ecf368e6a6715966f69216e3ee86bf1a82a7 AR not available * This will be reimplemented with ActionORM or equivalent 06182ea02e92afad579998aa80144588e8865ac3 implicitly rendering a js response should not use the default layout [#1844 state:resolved] * This will be handled generically 893e9eb99504705419ad6edac14d00e71cef5f12 Improve view rendering performance in development mode and reinstate template recompiling in production [#1909 state:resolved] * We will need to reimplement rails-dev-boost on top of the refactor; the changes here are very implementation specific and cannot be cleanly applied. The following commits are implicated: 199e750d46c04970b5e7684998d09405648ecbd4 3942cb406e1d5db0ac00e03153809cc8dc4cc4db f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690 e3b166aab37ddc2fbab030b146eb61713b91bf55 ae9f258e03c9fd5088da12c1c6cd216cc89a01f7 44423126c6f6133a1d9cf1d0832b527e8711d40f 0cb020b4d6d838025859bd60fb8151c8e21b8e84 workaround for picking layouts based on wrong view_paths [#1974 state:resolved] * The specifics of this commit no longer apply. Since it is a two-line commit, we will reimplement this change. 8c5cc66a831aadb159f3daaffa4208064c30af0e make action_controller/layouts pick templates from the current instance's view_paths instead of the class view_paths [#1974 state:resolved] * This does not apply at all. It should be trivial to apply the feature to the reimplemented ActionController::Base. 87e8b162463f13bd50d27398f020769460a770e3 fix HTML fallback for explicit templates [#2052 state:resolved] * There were a number of patches related to this that simply compounded each other. Basically none of them apply cleanly, and the underlying issue needs to be revisited. After discussing the underlying problem with Koz, we will defer these fixes for further discussion.
* Some merge cleanupYehuda Katz2009-02-021-1/+1
|
* Merge commit 'rails/3-0-unstable'Yehuda Katz2009-01-301-28/+28
| | | | | | | | | | | | | Conflicts: actionpack/lib/action_controller/base.rb actionpack/lib/action_dispatch/http/mime_type.rb actionpack/lib/action_dispatch/http/request.rb actionpack/lib/action_view/base.rb actionpack/lib/action_view/paths.rb actionpack/test/controller/session/cookie_store_test.rb actionpack/test/dispatch/rack_test.rb actionpack/test/dispatch/request_test.rb
* Move dispatch related tests into test/dispatchJoshua Peek2009-01-281-0/+409