| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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`
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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`
|
| | |
| | |
| | | |
As we all know that Accessing mime types via constants is deprecated. Now, we are using `Mime::Type[:JSON]` instead of `Mime::JSON`
|
| | |
| | |
| | |
| | |
| | | |
We can know whether or not there is a content type object, and just exit
early. There is no need to `try` so hard.
|
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
This class gives us the `all?` predicate method that returns true
without hitting method missing
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since Mime::Type implements `method_missing`, and `blank?` triggers it's
positive branch:
https://github.com/rails/rails/blob/f9dda1567ea8d5b27bd9d66ac5a8b43dc67a6b7e/actionpack/lib/action_dispatch/http/mime_type.rb#L342
We should stop calling `blank?`.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Changes `Mimes` to compose a set rather than inherit from array. With
this change we don't need to define as many methods, so ISEQ memory is
saved. Also it is clear which methods break the set cache.
|
| | |
| | |
| | |
| | |
| | | |
We should be asking the mime type method for the mime objects rather
than via const lookup
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We don't want to manage a list of constants on `Mime::`. Managing
constants is strange because it will break method caches, not to mention
looking up by a constant could cause troubles. For example suppose
there is a top level constant `HTML`, but nobody registers the HTML mime
type and someone accesses `Mime::HTML`. Instead of getting an error
about how the mime type doesn't exist, instead you'll get the top level
constant.
So, instead of directly accessing the constants, change this:
Mime::HTML
To this:
Mime::Type[:HTML]
|
| | |
| | |
| | |
| | | |
Now we don't have to look it up with a `const_get`.
|
| | |
| | |
| | |
| | |
| | | |
This is an instance method on the request object now so we don't need it
anymore
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The middleware stack is a singleton in the application (one instance is
shared for the entire application) which means that there was only one
opportunity to set the parameter parsers. Since there is only one set
of parameter parsers in an app, lets just configure them on the request
class (since that is where they are used).
|
| | |
| | |
| | |
| | |
| | |
| | | |
we need to be more specific about exception handling when dealing with
the parse strategies. The calls to `return yield` can also raise an
exception, but we don't want to handle that in *this* code.
|
| | |
| | |
| | |
| | |
| | | |
`normalize_encode_params` is common to all parser code paths, so we can
pull that up and always apply it before assigning the request parameters
|
| | |
| | |
| | |
| | |
| | | |
since there is only one "default" strategy now, we can just use the
block parameter for that.
|
|/ /
| |
| |
| |
| | |
All parameter parsing should be on the request object because the
request object is the object that we ask for parameters.
|
| |
| |
| |
| | |
this commit removes some direct access to `env`.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This method is specifically about the content type so lets remove the
parameter.
|
| |
| |
| |
| |
| | |
create a singleton content type that just has nils, so that we don't
have to allocate a content type object all the time.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
It turns out that the response object never really cares what the mime
type object is, so just use the string.
|
| |
| |
| |
| | |
pull content-type setting to a private method to dry it up.
|
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
we'll use this method later to lazily parse content type headers.
|
| |
| |
| |
| |
| |
| | |
Just include the modules necessary in the Request object to implement
the things we need. This should make it easier to build delegate
request objects because the API is smaller
|
|\ \
| | |
| | | |
[ci skip] Added localhost IPv6
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix broken IPv6 addresses handling
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Code cleanup
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Cleanup for `ActionDispatch::Http::Parameters` - no need for required libraries
and remove not used private method.
Apparently this method was used in `ActionDispatch::Http::Request` - fixed
by calling `Request::Utils` explicitly (as was done in other parts of the codebase)
|
| | | |
| | | |
| | | |
| | | |
| | | | |
eventually we'll remove this instance variable, but this is the first
step
|
| | | |
| | | |
| | | |
| | | |
| | | | |
we're storing the value in the headers hash, so lets just store the
value in one place.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Modules should be using the API that the abstract modules use so that we
can move these modules between implementations
|
| | | |
| | | |
| | | |
| | | |
| | | | |
cookies are always stored as a string in the header hash, so it will not
need to be joined.
|
| | | | |
|
|/ / /
| | |
| | |
| | | |
eventually we will refactor this to not know about header hashes
|