I'm seeing two different values for request.env['CONTENT_TYPE']
and request.content_type
.
From a separate application, I am sending a request to my Rails application and have explicitly set the Content-Type
to text/xml
.
Here is what I am seeing on the other end, from within my Rails application:
request.env['CONTENT_TYPE'] = "text/xml"
request.content_type = "application/xml"
request.content_type
is actually action_dispatch.request.content_type
- What is the difference between
request.env['CONTENT_TYPE']
andrequest.content_type
? - Why are these two values different?