[英]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标头设置为*/*
,这实际上意味着“亲爱的服务器根据您的喜好以所需的任何内容类型将响应发回给我”。
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.