Flowdock
_send_file(output, input, offset, size) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

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
Register or log in to add new notes.