about summary refs log tree commit homepage
path: root/lib/unicorn/http_response.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicorn/http_response.rb')
-rw-r--r--lib/unicorn/http_response.rb21
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