Responding early to an large http request triggers an EPROTOTYPE error on my machine which is running OS X 10.10.4 (14E46). Lowering the size of the buffer in the testcase below makes everything work.
Output
events.js:141
throw er; // Unhandled 'error' event
^
Error: write EPROTOTYPE
at Object.exports._errnoException (util.js:812:11)
at exports._exceptionWithHostPort (util.js:835:20)
at WriteWrap.afterWrite (net.js:758:14)
Testcase
var http = require('http')
var port = 5467
var app = http.createServer()
app.on('request', function (req, res) {
res.end('No thanks')
})
app.listen(port, function () {
var req = http.request({
port: port, method: 'POST'
})
req.end(new Buffer(5600000))
})
Versions
{ http_parser: '2.5.0',
node: '3.0.0',
v8: '4.4.63.26',
uv: '1.6.1',
zlib: '1.2.8',
ares: '1.10.1-DEV',
modules: '45',
openssl: '1.0.2d' }
Responding early to an large http request triggers an
EPROTOTYPEerror on my machine which is running OS X 10.10.4 (14E46). Lowering the size of the buffer in the testcase below makes everything work.Output
Testcase
Versions