简体   繁体   English

在rails日志中将controller_name处理为* / *的含义

[英]Meaning of processing controller_name as */* in rails logs

I'm getting following in my production logs. 我正在生产日志中关注。

Processing by Foo::FoosController#robots as */*

In normal cases I see html or json or xml in place of */* . 在正常情况下,我看到html或json或xml代替*/*

I wanted to know that what does that */* means ? 我想知道*/*是什么意思?

as */* shows the accept header used by the client for the request. as */*表示客户端用于请求的接受标头。 Robots generally sets the accept header to */* which essentially means "Dear server give my back the response in whatever content type you want according to your preference". 机器人通常将accept标头设置为*/* ,这实际上意味着“亲爱的服务器根据您的喜好以所需的任何内容类型将响应发回给我”。

More details here . 更多细节在这里

an asterisk "*" may be used in place of either the second half of the content-type value, or both halves. 可以使用星号“ *”代替内容类型值的后半部分或两个部分。 This only applies to the Accept: filed, and not to the content-type field of course. 这仅适用于“接受:”字段,而不适用于“内容类型”字段。

 Accept: *.*, q=0.1 Accept: audio/*, q=0.2 Accept: audio/basic q=1 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从Rails中的URL中删除controller_name - Remove controller_name from URL in Rails Rails:一些索引路由显示“ / controller_name / index”,其他仅显示“ / controller_name” - Rails: Some index routes are showing “/controller_name/index” others are just showing “/controller_name” 模型方法中的Rails4 Access controller_name - Rails4 Access controller_name from model method 在rails 3.1.0中,params [:controller_name] [:field1]和params [:field1]是否相同? - Are params[:controller_name][:field1] and params[:field1] the same in rails 3.1.0? 从Rails 3中的URL中删除controller_name并使用自定义字符串而不是id - Remove controller_name from URL in Rails 3 and use custom string instead of id 如何获得父母的controller_name? - How to get parent's controller_name? 没有匹配的路由{:action =>“ show”,:controller =>“ controller_name”} - No route matches {:action=>“show”, :controller=>“controller_name”} link_to与controller_name和操作名称不起作用 - link_to with controller_name and action name not working 如何在Ruby on Rails中从views / controller_name / page1.html.erb链接到公用文件夹中的项目? - How do I link to an item in the public folder from views/controller_name/page1.html.erb in Ruby on Rails? befor_filter授权取决于controller_name - befor_filter authorize depend on controller_name
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM