我正在做一些与编码无关的事情(以及在不同的Safari窗口中),当我无处不在时,我看到日志生成了一堆GET请求。开头看起来像这样:
Started GET "/" for ::1 at 2015-06-28 18:19:41 -0400
Processing by StaticPagesController#home as HTML
Rendered static_pages/home.html.erb within layouts/application (0.3ms)
Rendered layouts/_shim.html.erb (0.1ms)
Rendered layouts/_header.html.erb (3.0ms)
Rendered layouts/_footer.html.erb (0.2ms)
Completed 200 OK in 375ms (Views: 373.9ms | ActiveRecord: 0.0ms)
Started GET "/login" for ::1 at 2015-06-28 18:19:12 -0400
Processing by SessionsController#new as HTML
Rendered sessions/new.html.erb within layouts/application (920.0ms)
Rendered layouts/_shim.html.erb (0.1ms)
Rendered layouts/_header.html.erb (101.4ms)
Rendered layouts/_footer.html.erb (0.2ms)
Completed 200 OK in 1884ms (Views: 1883.2ms | ActiveRecord: 0.0ms)
[2015-06-28 18:19:14] ERROR Errno::ECONNRESET: Connection reset by peer
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/httpserver.rb:80:in `eof?'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/httpserver.rb:80:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
然后第一个块再次重复n次,直到我停止服务器。唯一的异常现象如下:
Started GET "/" for ::1 at 2015-06-28 18:19:41 -0400
Processing by StaticPagesController#home as HTML
Rendered static_pages/home.html.erb within layouts/application (0.3ms)
Rendered layouts/_shim.html.erb (0.1ms)
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 13]]
Rendered layouts/_header.html.erb (4.5ms)
Rendered layouts/_footer.html.erb (0.2ms)
Completed 200 OK in 237ms (Views: 235.3ms | ActiveRecord: 0.4ms)
ID:13是我正在使用的user_id。
任何线索可能是什么?看起来很可疑。
答案 0 :(得分:1)
您的应用是否会运行任何AJAX请求?由于这是在localhost上,在假设恶意或hackery之前,我假设一些与您的Rails服务器相关的流氓进程。具体而言,我会制作一份如下所示的清单: