There are a couple of problems here:
- Since
self.method is defined piping fails because the destination has no method .setHeader(). Looks like a miss on capability detection.
/a-project/node_modules/filed/main.js:87
self.dest.setHeader('content-type', self.mimetype)
^
TypeError: Cannot call method 'setHeader' of undefined
at /a-project/node_modules/filed/main.js:87:19
at Object.oncomplete (/a-project/node_modules/filed/main.js:152:7)
- Even if that is fixed since the request method is not
HEAD it will attempt to pipe to an undefined destination:
stream.js:52
dest.on('drain', ondrain);
^
TypeError: Cannot call method 'on' of undefined
at [object Object].pipe (stream.js:52:8)
at /a-project/node_modules/filed/main.js:111:42
at Object.oncomplete (/a-project/node_modules/filed/main.js:154:7)
With both of those fixed I'm seeing empty files on disk. This may be a problem in some implementation on my end so I'm investigating further, but those two errors are definitely small bugs.
There are a couple of problems here:
self.methodis defined piping fails because the destination has no method .setHeader(). Looks like a miss on capability detection.HEADit will attempt to pipe to an undefined destination:With both of those fixed I'm seeing empty files on disk. This may be a problem in some implementation on my end so I'm investigating further, but those two errors are definitely small bugs.