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
header 'Content-Type', 'application/json'
get 'some/path'
However, rack-test stomps the content type header. First, #headers_for_environmentconverts it to HTTP_CONTENT_TYPE. Then #env_for sets the content type to application/x-www-form-urlencoded here. Since my content type header was converted to HTTP_CONTENT_TYPE, CONTENT_TYPE has no value and the ||= stomps it.
I'm willing to take a crack at fixing it and submitting a patch, but I'm not sure of the reason for the conversion to HTTP_CONTENT_TYPE. What's the best way to fix this?
The text was updated successfully, but these errors were encountered:
I tried setting the Content-Type header like so:
However, rack-test stomps the content type header. First,
#headers_for_environment
converts it to HTTP_CONTENT_TYPE. Then#env_for
sets the content type to application/x-www-form-urlencoded here. Since my content type header was converted to HTTP_CONTENT_TYPE, CONTENT_TYPE has no value and the||=
stomps it.I'm willing to take a crack at fixing it and submitting a patch, but I'm not sure of the reason for the conversion to HTTP_CONTENT_TYPE. What's the best way to fix this?
The text was updated successfully, but these errors were encountered: