summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-17 06:31:54 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-17 06:31:54 +0000
commite620587b3737bb7ffeb7a63e9bc3d722f5db1baa (patch)
treef660a39bcc2efeaf0fb3e25d25ac43ce061f632c
parent92c0612853e99c1abcab5073eaa1924cfbeeb300 (diff)
downloadruby-e620587b3737bb7ffeb7a63e9bc3d722f5db1baa.tar.gz
ruby-e620587b3737bb7ffeb7a63e9bc3d722f5db1baa.tar.xz
ruby-e620587b3737bb7ffeb7a63e9bc3d722f5db1baa.zip
* lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should
break the loop if the socket reached to EOF. [ruby-talk:142285] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/webrick/httpserver.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 02ac24946..1714a9fb0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue May 17 15:31:31 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
+
+ * 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 <usa@ruby-lang.org>
* win32/win32.c (unixtime_to_filetime): use localtime() instead of
diff --git a/lib/webrick/httpserver.rb b/lib/webrick/httpserver.rb
index 06d2ea1b6..ccb656299 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