private Method

HTTPResponse._send_file(output, input, offset, size)

There's no documentation for this item.

Source Code

# File 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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.