* lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):
ensure to close @body. (http://bugs.debian.org/277520) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2870c4d1a6
commit
b8f68de2be
@ -1,3 +1,8 @@
|
|||||||
|
Thu Oct 21 19:06:15 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||||
|
|
||||||
|
* lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):
|
||||||
|
ensure to close @body. (http://bugs.debian.org/277520)
|
||||||
|
|
||||||
Thu Oct 21 13:11:31 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
Thu Oct 21 13:11:31 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (pipe_open): variable name "fpw" is conflicted.
|
* io.c (pipe_open): variable name "fpw" is conflicted.
|
||||||
|
@ -254,6 +254,7 @@ module WEBrick
|
|||||||
private
|
private
|
||||||
|
|
||||||
def send_body_io(socket)
|
def send_body_io(socket)
|
||||||
|
begin
|
||||||
if @request_method == "HEAD"
|
if @request_method == "HEAD"
|
||||||
# do nothing
|
# do nothing
|
||||||
elsif chunked?
|
elsif chunked?
|
||||||
@ -271,8 +272,10 @@ module WEBrick
|
|||||||
_send_file(socket, @body, 0, size)
|
_send_file(socket, @body, 0, size)
|
||||||
@sent_size = size
|
@sent_size = size
|
||||||
end
|
end
|
||||||
|
ensure
|
||||||
@body.close
|
@body.close
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def send_body_string(socket)
|
def send_body_string(socket)
|
||||||
if @request_method == "HEAD"
|
if @request_method == "HEAD"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user