| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
| | | |
| | | |
| | | | |
Otherwise the state of callback chain is leaked.
|
|\ \ \ \
| | | | |
| | | | | |
Restore Response.default_headers after test.
|
| | | | | |
|
|/ / / / |
|
|\ \ \ \
| |/ / /
|/| | | |
Make sure Mime::Type is not altered after tests.
|
| | | | |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Remove duplicated HashWithIndifferentAccess#with_indifferent_access.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
application. Use of a symbol should be replaced with `action: symbol`.
Use of a string without a "#" should be replaced with `controller: string`.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
I'm not sure if this is actually used, but I'm adding a test to define
the behavior
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
Unlike the outer `rescue`, this one is much more precise about what we
want to handle: a connection failure (`Dalli::RingError`) is not
relevant to what we're testing here. But other Dalli errors may well be
indicating an actual problem.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes URL generation with trailing_slash: true
Conflicts:
actionpack/lib/action_dispatch/http/url.rb
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
URL generation with trailing_slash: true was adding a trailing slash
after .:format
Routes.draw do
resources :bars
end
bars_url(trailing_slash: true, format: 'json')
# => /bars.json/
This commit removes that extra trailing slash
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
stop hardcoding hash keys and use the accessors provided on the request
object.
|
| | | |
| | | |
| | | |
| | | | |
this decouples our code from the env hash a bit.
|
| |/ /
|/| |
| | |
| | | |
There are performance gains to be made by avoiding URI setter methods.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
There may be situations where you need to tunnel SSL connections over
port 80 so we shouldn't remove it if it has been explicitly provided.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously if you were looking for a given key, the header may incorrectly tell you that it did not exist even though it would return a valid value:
```ruby
env = { "CONTENT_TYPE" => "text/plain" }
headers = ActionDispatch::Http::Headers.new(env)
headers["Content-Type"]
# => "text/plain"
headers.key?("Content-Type")
# => false
```
This PR fixes that behavior by converting the key before checking for presence
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Callable route constraint verification
Conflicts:
actionpack/CHANGELOG.md
|
| | |
| | |
| | |
| | | |
silently failing to enforce the constraint
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Make remote_ip detection properly handle private IPv6 addresses
Conflicts:
actionpack/CHANGELOG.md
|
| | | |
| | | |
| | | |
| | | | |
Fixes #12638.
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, the `VerifyAndUpgradeLegacySignedMessage` assumes all incoming
cookies are marshal-encoded. This is not the case when `secret_token` is
used in conjunction with the `:json` or `:hybrid` serializer.
In those case, when upgrading to use `secret_key_base`, this would cause a
`TypeError: incompatible marshal file format` and a 500 error for the user.
Fixes #14774.
*Godfrey Chan*
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1. Escape '%' characters in URLs - only unescaped data
should be passed to URL helpers
2. Add an `escape_segment` helper to `Router::Utils`
that escapes '/' characters
3. Use `escape_segment` rather than `escape_fragment`
in optimized URL generation
4. Use `escape_segment` rather than `escape_path`
in URL generation
For point 4 there are two exceptions. Firstly, when a route uses wildcard
segments (e.g. *foo) then we use `escape_path` as the value may contain '/'
characters. This means that wildcard routes can't be optimized. Secondly,
if a `:controller` segment is used in the path then this uses `escape_path`
as the controller may be namespaced.
Fixes #14629, #14636 and #14070.
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
Use common to_io so users can access the underlying IO object
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In some cases users may need to work with/manipulate more of the
Tempfile api than provided by Upload. Allow users to get at the
underlying io via the common to_io method of IO/IO-like objects
|
|/ / / |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This parsing is unecessary once the Request object already has the
needed information.
|
| | | |
|
| | |
| | |
| | | |
Adding tests for Session `destroy`, `update` and `delete` methods. No changes for code under test.
|
| | |
| | |
| | |
| | | |
than assume SecureRandom is available
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The method `shallow?` returns false if the parent resource is a singleton so
we need to check if we're not inside a nested scope before copying the :path
and :as options to their shallow equivalents.
Fixes #14388.
|