| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | | |
Rack::Response::Helpers implements this method, so we can safely remove
it
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | | |
now the caller can just treat it like a regular controller even though
it will return a 404
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
We don't want to directly access the env hash
|
| | |
| | |
| | |
| | |
| | | |
I want to implement this with something besides `@env` in the future, so
lets stop directly referencing it.
|
| | |
| | |
| | |
| | |
| | | |
This commit allows us to use one request object rather than allocating
multiple request objects to deal with the session.
|
| | |
| | |
| | |
| | |
| | | |
We're going to implement storing env values differently in the future,
so let's disconnect these methods from the instance variables
|
| | | |
|
| | |
| | |
| | |
| | | |
we're already doing this with a bunch of other header data.
|
| | |
| | |
| | |
| | | |
we have a method that knows how to get rack.input, so lets use that.
|
| | |
| | |
| | |
| | |
| | |
| | | |
We need to abstract the internals of the request object away from this
instance variable so that the values for `@env` can be calculated in a
different way.
|
| | | |
|