You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously when making a request to a URL without a format and a
non-HTML Accept header the content type would be returned as
`text/html` even if it was meant to be another type like JSON.
To fix this people had to manually set a route default to whatever
was their desired content type was but this workaround couldn't
handle routes with multiple content types.
This commit fixes it by determining the extension from the request
object if there is no `:format` parameter set in the params. For
backwards compatibility if the Accept header indicates a HTML
request then the fragment is saved without an extension - otherwise
upgrading to this version of the gem would invalidate all existing
cached actions and cause possible cache storms/thundering herds
when deployed to production.
Some consideration was given to expiring both extension-less paths
and paths with `.html` when `expire_action` is called with a `"html"`
format parameter but it's probably best left to the application
developer as it could expire items from caches unexpectedly.
Fixes#18.
0 commit comments