method
_send_file
_send_file(output, input, offset, size)
private
Hide source
# File lib/webrick/httpresponse.rb, line 304 def _send_file(output, input, offset, size) while offset > 0 sz = BUFSIZE < offset ? BUFSIZE : offset buf = input.read(sz) offset -= buf.size end if size == 0 while buf = input.read(BUFSIZE) _write_data(output, buf) end else while size > 0 sz = BUFSIZE < size ? BUFSIZE : size buf = input.read(sz) _write_data(output, buf) size -= buf.size end end end


