开发者

In a Rails log file, what does "Processing by ProductsController#index as */*" mean?

In my Rails log file, I see lots of

Star开发者_开发问答ted GET "/" for 63.148.78.244 at Fri Sep 24 19:03:39 +0000 2010
  Processing by ProductsController#index as HTML

I understand this means Rails is serving up an HTML page. However, what does this mean?

Started GET "/" for 63.148.78.244 at Fri Sep 24 18:05:51 +0000 2010
  Processing by ProductsController#index as */*
Completed   in 0ms

Why the */*?


It depends on the HTTP_ACCEPT header that is sent by the browser. The common scenario is that the browser sends list of all MIME types that can process and server returns the result in one of them - typically HTML.

But in some cases it's not this way. For example if you use wget without any other parameters.

Try

wget http://yourserver

and you will see in your log file * / * which means that the "browser" accepts anything you will send back (it's quite obvious that wget can accept anything as it is just storing it into the file).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜