prdn / pigato

PIGATO - an high-performance Node.js microservices framework
http://prdn.github.io/pigato/
MIT License
301 stars 31 forks source link

response.end() first argument required #50

Closed DenisGorbachev closed 9 years ago

DenisGorbachev commented 9 years ago

Currently, pigato requires the worker to call response.end(something). If you just call response.end(), the W_REPLY will not be sent. That means you can't fs.createReadStream("/some/file").pipe(response) (despite what README states). That's because official Streams API states that last argument to .end() is optional, and fs.createReadStream indeed calls .end() without arguments.

Could you please fix it?

prdn commented 9 years ago

6ac1911e4dc233240962a456ec09f7b3abd6a8b8 should fix this one. Let me know if it works for you.

Thanks

prdn commented 9 years ago

Seems correctly fixed

DenisGorbachev commented 9 years ago

oh, missed your first comment... thanks for the fix!