Skip to content

Loading…

return the destination stream, fixes issue#23 #25

Merged
merged 1 commit into from

3 participants

@substack

If this gets merged then I can pipe filed to oppressor to do gzip/deflate compression like this:

var oppressor = require('oppressor');
var filed = require('filed');
var http = require('http');

var server = http.createServer(function (req, res) {
    filed(__dirname + '/data.txt').pipe(oppressor(req)).pipe(res);
});
server.listen(8000);

Issue: #23

@jcrugzz

@substack the return dest; line in your fork disappeared somehow. Anyway you could fix that until this is merged?

@mikeal mikeal merged commit d91f706 into mikeal:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 28, 2012
  1. @substack
Showing with 1 addition and 0 deletions.
  1. +1 −0 main.js
View
1 main.js
@@ -178,6 +178,7 @@ File.prototype.pipe = function (dest, options) {
this.destOptions = options
dest.emit('pipe', this)
// stream.Stream.prototype.pipe.call(this, dest, options)
+ return dest
}
File.prototype.write = function (chunk, encoding) {
if (encoding) chunk = chunk.toString(encoding)
Something went wrong with that request. Please try again.