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
Where the call request.content_type used to return 'text/csv' in Rails 6, it now returns the entire header, something like 'text/csv;header=present;charset=utf-16' in Rails 7. To return just the MIME type, one woud call request.media_type. This is what the agent is expected to send via spec. Definition.
We should replace calls to request.content_type with request.media_type. We should confirm request.media_type exists in older Rails versions. Already confirmed in Rails 6.
workato-integrationbot
changed the title
Replace Rails content_type header with media_type
Replace Rails content_type header with media_typeMar 13, 2024
A change in Rails 6.1 -> Rails 7 includes ActionDispatch::Request#content_type now returns Content-Type header as it is.
Where the call
request.content_type
used to return'text/csv'
in Rails 6, it now returns the entire header, something like'text/csv;header=present;charset=utf-16'
in Rails 7. To return just the MIME type, one woud callrequest.media_type
. This is what the agent is expected to send via spec. Definition.We should replace calls to
request.content_type
withrequest.media_type
. We should confirmrequest.media_type
exists in older Rails versions. Already confirmed in Rails 6.Discovered in #2500
The text was updated successfully, but these errors were encountered: