aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/response.rb
Commit message (Collapse)AuthorAgeFilesLines
* edit pass over all warningsXavier Noria2014-10-281-3/+3
| | | | | | | | | | | | | | | This patch uniformizes warning messages. I used the most common style already present in the code base: * Capitalize the first word. * End the message with a full stop. * "Rails 5" instead of "Rails 5.0". * Backticks for method names and inline code. Also, converted a few long strings into the new heredoc convention.
* let's warn with heredocsXavier Noria2014-10-281-1/+7
| | | | | | | | | | | | The current style for warning messages without newlines uses concatenation of string literals with manual trailing spaces where needed. Heredocs have better readability, and with `squish` we can still produce a single line. This is a similar use case to the one that motivated defining `strip_heredoc`, heredocs are super clean.
* remove duplicate method (_status_code) in action_dispatchAbdelkader Boudih2014-10-191-3/+0
|
* Make _status_code methods nodocPrathamesh Sonpatki2014-10-191-1/+1
| | | | | - Also one minor change for documenting url_for method in ActionController::Metal. [ci skip]
* Add support for Rack::ContentLength middelwareJavan Makhmali2014-09-061-0/+4
|
* Deprecate implicit AD::Response splatting and Array conversionJeremy Kemper2014-09-061-2/+13
|
* Handle client disconnect during live streamingMatthew Draper2014-06-081-13/+47
| | | | .. even when the producer is blocked for a write.
* fixes stack level too deep exception on action named 'status' returning ↵Christiaan Van den Poel2014-05-151-0/+3
| | | | 'head :ok'
* use the body proxy to freeze headersAaron Patterson2014-03-121-5/+32
| | | | | | avoid freezing the headers until the web server has actually read data from the body proxy. Once the webserver has read data, then we should throw an error if someone tries to set a header
* only write the jar if the response isn't committedAaron Patterson2014-03-121-0/+4
| | | | | | | | | | | when streaming responses, we need to make sure the cookie jar is written to the headers before returning up the stack. This commit introduces a new method on the response object that writes the cookie jar to the headers as the response is committed. The middleware and test framework will not write the cookie headers if the response has already been committed. fixes #14352
* Do note remove `Content-Type` when `render :body`Prem Sichanugrist2014-03-051-12/+1
| | | | | | | | | | | | | `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-2/+13
| | | | | 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-1/+1
| | | | | | | | | | | | 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-1/+1
| | | | | | 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.
* FilterRedirect is referenced at the class level from the ResponseAaron Patterson2014-01-311-0/+1
| | | | | We can just require the file rather than going through the autoload indirection
* Remove deprecated cattr_* requiresGenadi Samokovarov2013-12-031-1/+1
|
* Reuse variable to avoid symbol usageCarlos Antonio da Silva2013-08-311-2/+2
|
* update Rails::Railtie::Configuration and ↵Jon Kessler2013-08-161-1/+1
| | | | ActionDispatch::Response#respond_to? to accept include_private argument
* writing the new body can cause the response to be committed and theAaron Patterson2013-06-281-1/+3
| | | | | | | | request thread to return up the stack before the instance variable is assigned. Synchronize so that the ivar is assigned before the other thread can activate. fixes #10984
* Add propery docs to ActionDispatch::Response [ci skip]Steve Klabnik2013-05-301-3/+19
| | | | | | | | | | | | | After some discussion on Twitter with @skud, the documentation on ActionDispatch::Response is a bit sparse. This class is useful when you're writing tests, as often you want to assert various things about the response that's coming back. Better docs would make this easier for people new to testing in Rails. I only added some descriptions for various properties that were defined, and mostly just a sentence or two. Most of these things are familliar if you're working with HTTP, but some words is better than no words at all. Hopefully further commits will fix up things that aren't just documentation.
* extract no content response codes to a constantVipul A M2013-04-221-1/+2
|
* Removed an old require of an MD5 digest which is no longer used.wangjohn2013-02-151-1/+0
|
* Avoid to_sym callsSantiago Pastorino2013-02-131-1/+1
|
* generic pass before merging docrailsXavier Noria2013-01-261-5/+7
|
* Add documentation to ActionDispatch::ResponseMatthew Stopa2013-01-201-0/+7
|
* Fix typo introduced in 0004ca3aCarlos Antonio da Silva2013-01-161-1/+1
| | | | [ci skip]
* More documentation for ActionDispatch::ResponseMatthew Stopa2013-01-161-1/+3
| | | | [ci skip]
* Document ActionDispatch::Response#body methodMatthew Stopa2013-01-161-0/+1
|
* charset should not be appended for `head` responsesYves Senn2012-12-311-2/+6
| | | | | | | 1) Failure: test_head_created_with_image_png_content_type(RenderTest) [test/controller/render_test.rb:1238]: Expected: "image/png" Actual: "image/png; charset=utf-8"
* Adding filter capability to ActionController logsFabrizio Regini2012-12-051-0/+1
|
* push header merge down to a private method so that live responses can have ↵Aaron Patterson2012-08-131-3/+7
| | | | their own header object
* introduce default_headers configEgor Homakov2012-08-091-0/+5
|
* load active_support/core_ext/module/delegation in active_support/railsXavier Noria2012-08-021-1/+0
|
* load active_support/core_ext/object/blank in active_support/railsXavier Noria2012-08-021-1/+0
|
* header hash is duped before being sent up the rack stackAaron Patterson2012-07-291-12/+16
|
* ActionController::DataStreaming::FileBody doesn't respond to #close.Rafael Mendonça França2012-07-291-1/+1
|
* flushing output should write to the stream rather than mutating the response ↵Aaron Patterson2012-07-291-8/+12
| | | | object
* adding a buffered stream to the response objectAaron Patterson2012-07-291-2/+42
|
* initialize ivars, refactor recycle! to call initializeAaron Patterson2012-07-291-0/+2
|
* threads can wait on responses to be committedAaron Patterson2012-07-271-1/+24
|
* Fix comment in AD http responseAlexey Vakhov2012-04-131-1/+1
| | | | response in integration test accessible without @ via attr_reader
* Add ActionController::HTTPSantiago Pastorino2012-03-141-2/+7
| | | | | | More info http://edgeguides.rubyonrails.org/api_app.html [Carlos Antonio da Silva & Santiago Pastorino]
* remove check for string from request body setterlest2011-12-211-8/+1
| | | | it was required on ruby 1.8
* use Array#join so that file encoding doesn't impact returned string.Aaron Patterson2011-12-121-3/+3
| | | | Fixes #3957
* Use freezed string constant. Some string literals is used repeatedly.kennyj2011-12-081-8/+10
|
* Use default charset when we read content type without charset.kennyj2011-12-071-1/+1
|
* removed deprecated methods, and related tests, from ActionPackJosh Kalderimis2011-05-241-23/+0
|
* Make :status an attr_reader to avoid unnecessary warning when replacing status=wycats2011-05-221-1/+2
|
* Fix previous commit by allowing a proc to be given as response_body. This is ↵José Valim2011-05-101-15/+41
| | | | deprecated and is going to be removed in future releases.
* Fix tests on 1.8 by explicitly checking for strings (which also improves ↵José Valim2011-04-201-1/+9
| | | | performance).