Permalink
Switch branches/tags
Nothing to show
Commits on Dec 11, 2011
  1. Merge pull request #1 from d--j/master

    yob committed Dec 11, 2011
    Downloading without blocking the reactor
  2. Introduce IOStreamer to be able to download large files.

    d--j committed Dec 11, 2011
    Add class IOStreamer that handles sending out of band data to the client. It does not block the reactor by sending big data in smaller chunks.
Commits on Nov 21, 2011
  1. remove the redis example

    yob committed Nov 21, 2011
Commits on Nov 18, 2011
  1. add support for the EPRT command

    yob committed Nov 18, 2011
    * fancier version of the PORT command
  2. add support for the FEAT command

    yob committed Nov 18, 2011
  3. add support for the EPSV command

    yob committed Nov 18, 2011
    * updated version of the PASV command for opening a passive data
      connection
  4. add a basic todo list

    yob committed Nov 18, 2011
  5. include binary in gem

    yob committed Nov 18, 2011
  6. add a changelog

    yob committed Nov 18, 2011
  7. prepare for release

    yob committed Nov 18, 2011
  8. whitespace

    yob committed Nov 18, 2011
  9. tweak display of process name

    yob committed Nov 18, 2011
Commits on Nov 17, 2011
  1. add usage section to the README

    yob committed Nov 17, 2011
  2. remove unused require

    yob committed Nov 17, 2011
  3. include infrastructure for booting a server and daemonising it

    yob committed Nov 17, 2011
    * saves repeating the boilerplate over and over
    * works kind of like rack apps, unicorn, etc
Commits on Nov 9, 2011
  1. fix a failing spec

    yob committed Nov 9, 2011
  2. fix counting of transferred bytes

    yob committed Nov 9, 2011
    * count bytes not chars
  3. change put_file driver method to accept a path to a tempfile

    yob committed Nov 9, 2011
    * uploads aren't stored in memory any more, so there's no risk of a DOS
      if a large file is uploaded
    * a similar change is required for the get_file driver method
    * it may be worth adding a new driver method that returns the maximum
      permitted upload size to allow server admins to prevent large files
      from being an issue.
  4. drivers have the option to receive files in memory or streamed

    yob committed Nov 9, 2011
    * in memory is easier but runs the risk of a DOS attack if a large file
      is uploaded
    * streaming is more complex but safer
  5. small tidy up

    yob committed Nov 9, 2011
  6. Support for streaming large uploads to the driver.

    d--j authored and yob committed Nov 7, 2011
    Saving large files in memory before calling @driver.put_file is not feasible. Uploads can potentially be gigabytes so we need to be able to process them in chunks.
    
    Here is a partly implementation of a Driver that writes the upload in a temporary file
    ``` ruby
    class StreamingDriver
      def features
        @features ||= {
          streaming: true
        }
      end
    
      def put_file(path, datasocket, &blk)
        dir = Dir.mktmpdir
        size = 0
        tmp_file_path = "#{dir}/upload"
        tmp_file = File.open(tmp_file_path, "w")
        cleanup = proc {
          FileUtils.remove_entry_secure dir, true
          blk.call size
        }
        datasocket.on_stream { |chunk| tmp_file.write chunk }
        datasocket.callback {
          size = tmp_file.size
          tmp_file.close
          # do something with upload
          cleanup.call
        }
        datasocket.errback {
          size = nil
          tmp_file.close
          cleanup.call
        }
      end
    ```
  7. add guard-rspec as development dependency

    d--j authored and yob committed Nov 4, 2011
  8. remove some warnings

    d--j authored and yob committed Nov 4, 2011
  9. switched to simpler EM::Protocols::LineProtocol (no need for binary d…

    d--j authored and yob committed Nov 7, 2011
    …ata on control channel)
  10. some ftp clients (namely Cyberduck) need two spaces between owner and…

    d--j authored and yob committed Nov 7, 2011
    … group. (as it is standard for UNIX's "ls -l")
  11. revert passing user to the driver all the time.

    d--j authored and yob committed Nov 7, 2011
    The driver can save its own state since it is cloned for each connection. The username can be one datum that the driver saves. But e.g. a user id or an an authenticity token could be other things to store in the driver.
  12. properly format HELP response and send the missing 214 Status code at…

    d--j authored and yob committed Nov 8, 2011
    … the end.