diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-02-05 14:33:43 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-02-09 19:50:43 -0800 |
commit | 07846bcac6604babf0dd1f296d99c148b63340d6 (patch) | |
tree | 87ce8395adb6960623cb4a6831b3f878edf3b899 /lib/unicorn/http_response.rb | |
parent | cda1f3381096cdb8c78a126a4993e458bf798ca2 (diff) | |
download | unicorn-07846bcac6604babf0dd1f296d99c148b63340d6.tar.gz |
Diffstat (limited to 'lib/unicorn/http_response.rb')
-rw-r--r-- | lib/unicorn/http_response.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/unicorn/http_response.rb b/lib/unicorn/http_response.rb index 7454516..f4b30fd 100644 --- a/lib/unicorn/http_response.rb +++ b/lib/unicorn/http_response.rb @@ -107,27 +107,6 @@ module Unicorn end end - # Appends the contents of +path+ to the response stream. The file is opened for binary - # reading and written in chunks to the socket. - # - # Sendfile API support has been removed in 0.3.13.4 due to stability problems. - def send_file(path, small_file = false) - if small_file - File.open(path, "rb") {|f| @socket << f.read } - else - File.open(path, "rb") do |f| - while chunk = f.read(Const::CHUNK_SIZE) and chunk.length > 0 - begin - write(chunk) - rescue Object => exc - break - end - end - end - end - @body_sent = true - end - def socket_error(details) # ignore these since it means the client closed off early @socket.close rescue nil |