Roda 3.95.0 Released #397
jeremyevans
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Roda 3.95.0 has been released!
New Features
A response_content_type plugin has been added for more easily
setting the content type of responses:
When setting the content-type, you can pass either a string, which
is used directly:
Or, if you have registered mime types when loading the plugin:
You can use a symbol:
If you would like to load all mime types supported by rack/mime,
you can use the
mime_types: :from_rack_mimeoption:Note that you are unlikely to be using all of these mime types,
so doing this will likely result in unnecessary memory usage. It
is recommended to use a hash with only the mime types your
application actually uses.
To prevent silent failures, if you attempt to set the response
type with a symbol, and the symbol is not recognized, a KeyError
is raised.
The typecast_params plugin now includes typecast_query_params and
typecast_body_params methods in addition to typecast_params.
typecast_query_params deals with query string parameters (r.GET),
and typecast_body_params deals with request body parameters
(r.POST).
Other Improvements
Roda::RodaPlugins::Sessions::CookieTooLarge if the total cookie
size is over 4K. Previously, it only raised the exception if the
cookie value was over 4K. Browsers enforce the limit on the total
cookie size, not just the value, so this change prevents Roda
from setting a cookie that a browser would ignore due to size
restrictions.
Thanks,
Jeremy
Beta Was this translation helpful? Give feedback.
All reactions