| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Suppress warnings of `assigned but unused variable`
|
| | |
|
|\ \ |
|
| | |
| | |
| | |
| | | |
This reverts commit 4147ab730e807f622e5260a5f876749ff41fef26.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
* add `end` to end of class definition
* add a blank line between explanation and example code
|
| |/
|/|
| |
| |
| |
| |
| | |
* 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.
|
| | |
|
| |
| |
| |
| | |
header.
|
| |
| |
| |
| |
| | |
* first test is for `default_charset` i.e `ActionDispatch::Response.default_charset = “utf-8”`
* In below test we are passing `ActionDispatch::Response.default_charset = 'utf-16’` so name of the test is irrelevant — “read content type without charset”
|
| |
| |
| |
| |
| |
| | |
Now, we use the mapper to build the routing table
related to https://github.com/rails/rails/commit/703275ba70efbefb3358052b6ba750443eff1a28
|
| |
| |
| |
| |
| | |
the caller of `handle_conditional_get!` checks the committed state of
the response, so we don't need to in the subclass.
|
| | |
|
|\ \
| | |
| | | |
fix Mime type in doc since mime types via constants is deprecated [ci…
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
We only want to activate flash when the user has enabled it. Api
servers don't use flash, so add an empty implementation to the base
Request object.
|
| | |
| | |
| | |
| | |
| | | |
Committing the flash needs to happen in order for the session to be
written correctly, so lets guarantee that it actually does happen.
|
|/ /
| |
| |
| |
| | |
I'm doing this so that we can commit the flash to the session object Out
of Band of the flash middleware
|
| |
| |
| | |
Accessing mime types via constants is deprecated. Now, we are using `Mime::Type[:JSON]` instead of `Mime::JSON`
|
| |
| |
| |
| |
| | |
Use the Rack utility methods for functional header manipulation. This
helps to eliminate coupling on the header hash
|
| |
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| | |
We should not mutate headers after the response has been committed.
|
| |
| |
| |
| |
| | |
we want the request to go through the test harness, not directly call
the methods on the controller
|
| |
| |
| |
| | |
also remove req / res references
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
again, since we are going through the test harness, all this is done
for us.
|
| |
| |
| |
| |
| | |
Since we just go through the normal test harness that sets up a request
for us, we don't need to do this anymore.
|
| |
| |
| |
| |
| |
| | |
rather than calling methods on the controller. We should test the
values returned by the controller rather than assuming that the
internals are implemented in a certain way.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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`
|
|\ \
| | |
| | | |
Document Bearer prefix for Authorization header [ci skip]
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It doesn't make sense to access the response object before a request is
made (how was a response object created without making a request?) This
commit splits testing default headers and default header mutation tests
and removes access to the pre-request response object.
|
| | |
| | |
| | |
| | | |
these should really be multiple tests.
|
|/ /
| |
| |
| |
| |
| | |
When the response object is `to_a`'d, that means it's been written to
the socket. It doesn't make sense to mutate the response object after
it's been written (and this may raise an exception in the future).
|
| |
| |
| | |
As we all know that Accessing mime types via constants is deprecated. Now, we are using `Mime::Type[:JSON]` instead of `Mime::JSON`
|
| |
| |
| |
| |
| | |
The flash middleware shouldn't know how to look up the session object.
Just ask the request for that information.
|
| |
| |
| |
| |
| | |
We can know whether or not there is a content type object, and just exit
early. There is no need to `try` so hard.
|
| | |
|
|\ \
| | |
| | | |
Added assertion for error messages for redirection to nil and params
|
| | |
| | |
| | | |
As both `redirect_to_nil` and `redirect_to_params` are raising same `ActionController::ActionControllerError` so it’s good to assert error messages as well
|
| | |
| | |
| | |
| | |
| | | |
Synonyms are always a list of strings, and we have access to the
internal string representation, so we can avoid allocating new arrays.
|
| | | |
|
| | |
| | |
| | |
| | | |
Now that `all` has it's own object, we don't need the html_types Set.
|