aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/response_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #20590 from vngrs/set_default_charsetRafael Mendonça França2015-07-271-0/+7
|\ | | | | Document, refactor and create test case for ActionDispatch::Response
| * Document, refactor and create test case for ↵Mehmet Emin İNAÇ2015-06-171-0/+7
| | | | | | | | ActionDispatch::Response#charset= method
* | Skip a few failing tests on JRuby with the attached ticketsRobin Dupret2015-07-171-0/+2
|/
* remove `header=` on the response object.Aaron Patterson2015-06-151-0/+2
| | | | | | People should be free to mutate the header object, but not to set a new header object. That header object may be specific to the webserver, and we need to hide it's internals.
* Revert "Revert integration test refactoring that caused app test regressions"eileencodes2015-03-091-4/+0
| | | | This reverts commit 714205988315d2f98aa3e749747c44470e18676b.
* Work around for upstream Ruby bug #10685Genadi Samokovarov2015-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | In f6e293ec54f02f83cdb37502bea117f66f87bcae we avoided a segfault in the tests, however I think we should try to avoid the crash, as it may happen in user code as well. Here is what I distiled the bug down to: ```ruby # Rails case - works on 2.0, 2.1; crashes on 2.2 require 'action_dispatch' ActionDispatch::Response.new(200, "Content-Type" => "text/xml") # General case - works on 2.0, 2.1; crashes on 2.2 def foo(optional = {}, default_argument: nil) end foo('quux' => 'bar') ```
* Fix segmentation fault in ActionPack testseileencodes2015-02-281-1/+1
| | | | | | Introduced in f6e293e ActionPack tests began sefaulting. I found that it was the kwargs and the test causing the seg fault was missing the new default_headers argument.
* Revert integration test refactoring that caused app test regressionsJeremy Kemper2015-02-261-0/+4
| | | | | | | | | | | | Haven't diagnosed yet. No similarly failing tests in Rails to work from. cc @tenderlove, @eileencodes Revert "there is always an integration session, so remove the check" Revert "lazily create the integration session" Revert "use before_setup to set up test instance variables" This reverts commits 4cf3b8ac47f109fa83a6f66eb97d6cb0eace0d05, 303567e554de26822f3107be55c471d6477a745f, and fa63448420d3385dbd043aca22dba973b45b8bb2.
* lazily create the integration sessionAaron Patterson2015-02-121-4/+0
| | | | now we don't have to call reset! everywhere
* Remove deprecated `ActionDispatch::Response#to_ary`Rafael Mendonça França2015-01-041-16/+2
|
* Add support for Rack::ContentLength middelwareJavan Makhmali2014-09-061-0/+14
|
* Deprecate implicit AD::Response splatting and Array conversionJeremy Kemper2014-09-061-3/+17
|
* Restore Response.default_headers after test.Zuhao Wan2014-06-051-2/+4
|
* Do note remove `Content-Type` when `render :body`Prem Sichanugrist2014-03-051-8/+0
| | | | | | | | | | | | | `render :body` should just not set the `Content-Type` header. By removing the header, it breaks the compatibility with other parts. After this commit, `render :body` will returns `text/html` content type, sets by default from `ActionDispatch::Response`, and it will preserve the overridden content type if you override it. Fixes #14197, #14238 This partially reverts commit 3047376870d4a7adc7ff15c3cb4852e073c8f1da.
* Add `#no_content_type` attribute to `AD::Response`Prem Sichanugrist2014-02-181-1/+1
| | | | | Setting this attribute to `true` will remove the content type header from the request. This is use in `render :body` feature.
* Introduce `render :body` for render raw contentPrem Sichanugrist2014-02-181-0/+8
| | | | | | | | | | | | This is an option for sending a raw content back to browser. Note that this rendering option will unset the default content type and does not include "Content-Type" header back in the response. You should only use this option if you are expecting the "Content-Type" header to not be set. More information on "Content-Type" header can be found on RFC 2616, section 7.2.1. Please see #12374 for more detail.
* Prevent [response].flatten from recursing infinitely.Dan Kang2014-02-081-0/+9
| | | | | | Returning `self` from within the array returned by `to_ary` caused this. Instead, we can just substitute another object. It provides the `each` behavior required by the rack spec.
* Add missing test for response destructuring.Myron Marston2014-02-081-0/+9
|
* update Rails::Railtie::Configuration and ↵Jon Kessler2013-08-161-0/+5
| | | | ActionDispatch::Response#respond_to? to accept include_private argument
* Don't set X-UA-Compatible header by defaultGuillermo Iguaran2013-06-131-3/+1
| | | | | | We are setting this header to chrome=1 for Chrome Frame and this will be retired soon. Check http://blog.chromium.org/2013/06/retiring-chrome-frame.html for details
* Add 'X-UA-Compatible' => 'chrome=1' to default headersGuillermo Iguaran2013-01-291-1/+3
|
* Use Encoding::UTF_8 constant :do_not_litter:Akira Matsuda2013-01-281-1/+1
|
* Integrate Action Pack with Rack 1.5Carlos Antonio da Silva2013-01-251-1/+1
| | | | | | All ActionPack and Railties tests are passing. Closes #8891. [Carlos Antonio da Silva + Santiago Pastorino]
* set default_headers to nil after use it to avoid order dependent testsFrancesco Rodriguez2012-09-081-25/+32
|
* Added X-Content-Type-Options to the header defaults.Jim Jones2012-08-181-1/+3
| | | | With a value of "nosniff", this prevents Internet Explorer from MIME-sniffing a response away from the declared content-type.
* some testsEgor Homakov2012-08-091-0/+27
|
* adding a buffered stream to the response objectAaron Patterson2012-07-291-0/+20
|
* fix failure test 'test_can_wait_until_commit(ResponseTest)' in actionpackVladimir Strakhov2012-07-281-2/+2
|
* threads can wait on responses to be committedAaron Patterson2012-07-271-0/+9
|
* deprecate String#encoding_aware? and remove its usageSergey Nartimov2011-12-241-3/+0
|
* use Array#join so that file encoding doesn't impact returned string.Aaron Patterson2011-12-121-0/+9
| | | | Fixes #3957
* Use default charset when we read content type without charset.kennyj2011-12-071-0/+11
|
* Do not inherit from Rack::Response, remove a shit-ton of unused code.José Valim2011-04-191-16/+0
|
* cleaning up some warnings on 1.9.3Aaron Patterson2011-02-071-5/+5
|
* Fix status initialization when custom status providedKrekoten' Marjan2010-10-181-0/+4
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Move ETag and ConditionalGet logic from AD::Response to the middleware stack.José Valim2010-10-031-8/+3
|
* Remove more warnings shadowing outer local variable.Emilio Tagua2010-09-271-8/+8
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Remove more warnings shadowing outer local variable.Emilio Tagua2010-09-271-8/+8
|
* Rely on set and delete cookie logic from rack.José Valim2010-05-181-0/+4
|
* Reinstate pending tests that were supposed to be fixed before theJoshua Peek2010-02-191-16/+8
| | | | | | beta. Shout louder this time so they actually get fixed.
* Cookies middlewareJoshua Peek2010-01-161-6/+3
|
* Fix bare string Rack response bodiesJeremy Kemper2009-12-231-2/+2
|
* Pending tests for AD ResponseJoshua Peek2009-12-171-0/+113
|
* Don't need response prepare!Joshua Peek2009-12-171-8/+0
|
* Remove legacy processing and content_lengthYehuda Katz2009-08-021-4/+2
| | | | | | | | | | | * convert_content_type! is handled by assign_default_content_type_and_charset! * set_content_length! should be handled by the endpoint server. Otherwise each middleware that modifies the body has to do the expensive work of recalculating content_length. * convert_language! appears to be legacy. There are no tests for this * convert_cookies! should be handled by the new HeaderHash in Rack * Use an integer for .status's internal representation to avoid needing to do String manipulation just to find out the status
* Update cache_control to be a Hash of options that is used to build the header.Yehuda Katz2009-08-021-2/+2
| | | | * Significantly simplifies setting and modifying cache control in other areas
* Move useful response test helpers into requestJoshua Peek2009-04-261-0/+47
|
* Create a new file for response testsJoshua Peek2009-04-261-0/+83