From 2866bd642f355acf22dc21fb6fe0e861717d105d Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Tue, 17 May 2005 06:31:54 +0000 Subject: [PATCH] * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should break the loop if the socket reached to EOF. [ruby-talk:142285] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/webrick/httpserver.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 02ac249461..1714a9fb01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue May 17 15:31:31 2005 GOTOU Yuuzou + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should + break the loop if the socket reached to EOF. [ruby-talk:142285] + Tue May 17 11:52:18 2005 NAKAMURA Usaku * win32/win32.c (unixtime_to_filetime): use localtime() instead of diff --git a/lib/webrick/httpserver.rb b/lib/webrick/httpserver.rb index 06d2ea1b6c..ccb656299d 100644 --- a/lib/webrick/httpserver.rb +++ b/lib/webrick/httpserver.rb @@ -52,7 +52,7 @@ module WEBrick timeout = 0 if @status != :Running timeout -= 0.5 end - raise HTTPStatus::EOFError if timeout <= 0 + raise HTTPStatus::EOFError if timeout <= 0 || sock.eof? req.parse(sock) res.request_method = req.request_method res.request_uri = req.request_uri