I see two different values for request.env['CONTENT_TYPE']and request.content_type.
request.env['CONTENT_TYPE']
request.content_type
In a separate application, I submit a request to my Rails application and explicitly install Content-Typein text/xml.
Content-Type
text/xml
Here is what I see at the other end, from my Rails application:
request.env['CONTENT_TYPE'] = "text/xml" request.content_type = "application/xml"
request.content_type in fact action_dispatch.request.content_type
action_dispatch.request.content_type
request.envcontains “thoughts” about what a content type is. This is usually the type of content of the request you requested.
request.env
request.content_type, , Rails , , . mime_types.rb Rails ( , , ), config/initializers/mime_types.rb.
mime_types.rb
config/initializers/mime_types.rb
Source: https://habr.com/ru/post/1789184/More articles:How to make a transition when changing a value in h: selectOneMenu? - spring-webflow-2how to control linux system on amazon ec2 without cloudwatch? - cloudПоразрядные операции помогут мне сериализовать некоторые bools? - c++https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1789182/abstract-class-needs-to-know-all-extending-classes&usg=ALkJrhjkhpm8LoegXS-7EgNAYMyMG4PCtAОпределить в PHP скрипт при подключении к Интернету? - phpLua embedding in C ++ mixed with C - c ++Web ui Drag and Drop DesignerIntegration with Twitter on iphone for reading public tweets / HashTags without using a username? - iphoneLocation Eclipse - res - androidHow to remove resizig handlers around image in IE using javascript? - javascriptAll Articles