- 07 12月, 2015 2 次提交
-
-
由 eileencodes 提交于
This adds a new method to request and response so we don't need to violate the law of demeter. We are changing `Request` and `Response` so that they always have a `cookie_jar` This is a continuation on work to combine integration and controller test code bases in Rails.
-
由 eileencodes 提交于
We want to get rid of the `Live::Response` so we are consolidating methods from `Live::Response` and `Response` by merging them together. This adds an `#empty` method to the request so we don't need to hard-code the empty array each time we call an empty `ActionDispatch::Request`. The work here is a continuation on combining controller and integration test code bases into one.
-
- 28 10月, 2015 1 次提交
-
-
由 Rafael Mendonça França 提交于
This is leftover from when `render nothing: true` rendered blank string.
-
- 07 10月, 2015 2 次提交
-
-
由 Aaron Patterson 提交于
Use the methods rack provides so we don't have to worry about the exact header key.
-
由 Jeremy Daer 提交于
Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries that support multiple Rails versions would've had to feature-detect whether to use `Mime::Type[:FOO]` or `Mime::FOO`. `Mime[:foo]` has been around for ages to look up registered MIME types by symbol / extension, though, so libraries and plugins can safely switch to that without breaking backward- or forward-compatibility. Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup by type or extension, so it's not available as `Mime[:all]`. We use it internally as a wildcard for `respond_to` negotiation. If you use this internal constant, continue to reference it with `Mime::ALL`. Ref. efc6dd55
-
- 06 10月, 2015 1 次提交
-
-
由 Aaron Patterson 提交于
Just a slight refactor that delegates file sending to the response object. This gives us the advantage that if a webserver (in the future) provides a response object that knows how to do accelerated file serving, it can implement this method.
-
- 04 10月, 2015 1 次提交
-
-
由 Jeremy Daer 提交于
* Introduce `ActionDispatch::Http::Headers#add` to add a value to a multivalued header. * Move `Response#add_header` upstream: https://github.com/rack/rack/pull/957 * Match upstream `Response#have_header?` -> `#has_header?` name change.
-
- 02 10月, 2015 1 次提交
-
-
由 Jeremy Daer 提交于
-
- 25 9月, 2015 2 次提交
-
-
由 Aaron Patterson 提交于
I want to move the header hash to the super request object in order to consolidate behavior. We should be switching out buffering strategies rather than header strategies since things like "mutating headers after send" is an error in both cases (buffering vs streaming).
-
由 Aaron Patterson 提交于
We should not mutate headers after the response has been committed.
-
- 24 9月, 2015 1 次提交
-
-
由 Aaron Patterson 提交于
I'm making this change so that I can construct response objects that *don't* have the default headers applied. For example, I would like to construct a response object from the return value of a controller. If you need to construct a response object with the default headers, then please use the alternate constructor: `ActionDispatch::Response.create`
-
- 22 9月, 2015 1 次提交
-
-
由 Aaron Patterson 提交于
We should be asking the mime type method for the mime objects rather than via const lookup
-
- 15 9月, 2015 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 09 9月, 2015 8 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
This method is specifically about the content type so lets remove the parameter.
-
由 Aaron Patterson 提交于
create a singleton content type that just has nils, so that we don't have to allocate a content type object all the time.
-
由 Aaron Patterson 提交于
If someone sets just a charset, but depends on the implicit type from rendering, this will store a strange content type header that looks like this: `; charset=blah`. This is so that when the content type header is parsed again, it will return nil for the actual type.
-
由 Aaron Patterson 提交于
It turns out that the response object never really cares what the mime type object is, so just use the string.
-
由 Aaron Patterson 提交于
pull content-type setting to a private method to dry it up.
-
由 Aaron Patterson 提交于
Instead of storing content type information in an ivar and a header, lets move to just store the content type info in just the header.
-
由 Aaron Patterson 提交于
we'll use this method later to lazily parse content type headers.
-
- 28 8月, 2015 3 次提交
-
-
由 Aaron Patterson 提交于
cookies are always stored as a string in the header hash, so it will not need to be joined.
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
eventually we will refactor this to not know about header hashes
-
- 27 8月, 2015 1 次提交
-
-
由 Aaron Patterson 提交于
Rack::Response::Helpers implements this method, so we can safely remove it
-
- 26 8月, 2015 1 次提交
-
-
由 Aaron Patterson 提交于
Controllers should always have a request and response when responding. Since we make this The Rule(tm), then controllers don't need to be somewhere in limbo between "asking a response object for a rack response" or "I, myself contain a rack response". This duality leads to conditionals spread through the codebase that we can delete: * https://github.com/rails/rails/blob/85a78d9358aa728298cd020cdc842b55c16f9549/actionpack/lib/action_controller/metal.rb#L221-L223
-
- 28 7月, 2015 1 次提交
-
-
由 Robin Dupret 提交于
-
- 14 7月, 2015 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 17 6月, 2015 2 次提交
-
-
由 Mehmet Emin İNAÇ 提交于
-
由 Mehmet Emin İNAÇ 提交于
-
- 16 6月, 2015 2 次提交
-
-
由 Aaron Patterson 提交于
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.
-
由 Aaron Patterson 提交于
this way we don't have to mutate the instance (as much) when writing a rack response
-
- 23 5月, 2015 1 次提交
-
-
由 karanarora 提交于
spelling fix [ci skip] example to be consistent [ci skip] grammatical fix typo fixes [ci skip]
-
- 05 3月, 2015 1 次提交
-
-
由 Genadi Samokovarov 提交于
The bug caused a segfault and you can find more info about it at: https://bugs.ruby-lang.org/issues/10685. We did a couple of work arounds, but 2.2.1 rolled out and those aren't needed anymore. Here are the reverted commits: - Revert "Work around for upstream Ruby bug #10685", commit 707a4338. - Revert "Fix segmentation fault in ActionPack tests", commit 22e0a22d. I'm also bumping the Ruby version check to 2.2.1 to prevent future segfaults.
-
- 01 3月, 2015 1 次提交
-
-
由 Genadi Samokovarov 提交于
In f6e293ec 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') ```
-
- 26 2月, 2015 1 次提交
-
-
由 Jeremy Kemper 提交于
Fixes regression in #18423. Merge default headers for new responses, but don't merge when creating a response from the last session request. hat tip @senny
❤
-
- 04 1月, 2015 2 次提交
-
-
由 Rafael Mendonça França 提交于
These requires were added only to change deprecation message
-
由 Rafael Mendonça França 提交于
-
- 29 10月, 2014 2 次提交
-
-
由 Xavier Noria 提交于
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.
-
由 Xavier Noria 提交于
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.
-