nodejitsu/pkgcloud — pull request #126 by kenperkins (2013-05-07 17:30:22+00:00)
Title: [Rackspace] Refactoring Inline Authentication for Streams (Upload/Download)

This changes completely re-does how stream proxying works with pkgcloud.

The objective (independent of this change) is to allow for implicit authentication while piping a stream to and upload or download.

The problem is with the current implementation, this doesn't work at all, and times out after 60 seconds.

The new solution uses a much simpler approach using [pause-stream](https://github.com/dominictarr/pause-stream) in lieu of [morestreams BufferedStream](https://github.com/mikeal/morestreams) and returns a paused stream until after auth, at which point it resumes.

All tests pass, tested against live cloud files as well.

Fixes #109, #125