{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/2382","labels_url":"https://api.github.com/repos/nodejs/node/issues/2382/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/2382/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/2382/events","html_url":"https://github.com/nodejs/node/issues/2382","id":101120365,"number":2382,"title":"EPROTOTYPE when responding early to large http request","user":{"login":"LinusU","id":189580,"avatar_url":"https://avatars.githubusercontent.com/u/189580?v=3","gravatar_id":"","url":"https://api.github.com/users/LinusU","html_url":"https://github.com/LinusU","followers_url":"https://api.github.com/users/LinusU/followers","following_url":"https://api.github.com/users/LinusU/following{/other_user}","gists_url":"https://api.github.com/users/LinusU/gists{/gist_id}","starred_url":"https://api.github.com/users/LinusU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinusU/subscriptions","organizations_url":"https://api.github.com/users/LinusU/orgs","repos_url":"https://api.github.com/users/LinusU/repos","events_url":"https://api.github.com/users/LinusU/events{/privacy}","received_events_url":"https://api.github.com/users/LinusU/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/buffer","name":"buffer","color":"f7c6c7"},{"url":"https://api.github.com/repos/nodejs/node/labels/http","name":"http","color":"c7def8"},{"url":"https://api.github.com/repos/nodejs/node/labels/os%20x","name":"os x","color":"9944dd"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-14T23:14:28Z","updated_at":"2015-08-15T02:34:51Z","closed_at":null,"body":"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.\r\n\r\n**Output**\r\n```text\r\nevents.js:141\r\n      throw er; // Unhandled 'error' event\r\n      ^\r\n\r\nError: write EPROTOTYPE\r\n    at Object.exports._errnoException (util.js:812:11)\r\n    at exports._exceptionWithHostPort (util.js:835:20)\r\n    at WriteWrap.afterWrite (net.js:758:14)\r\n```\r\n\r\n**Testcase**\r\n```javascript\r\nvar http = require('http')\r\n\r\nvar port = 5467\r\nvar app = http.createServer()\r\n\r\napp.on('request', function (req, res) {\r\n  res.end('No thanks')\r\n})\r\n\r\napp.listen(port, function () {\r\n  var req = http.request({\r\n    port: port, method: 'POST'\r\n  })\r\n\r\n  req.end(new Buffer(5600000))\r\n})\r\n```\r\n\r\n**Versions**\r\n```text\r\n{ http_parser: '2.5.0',\r\n  node: '3.0.0',\r\n  v8: '4.4.63.26',\r\n  uv: '1.6.1',\r\n  zlib: '1.2.8',\r\n  ares: '1.10.1-DEV',\r\n  modules: '45',\r\n  openssl: '1.0.2d' }\r\n```"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/131281310","html_url":"https://github.com/nodejs/node/issues/2382#issuecomment-131281310","issue_url":"https://api.github.com/repos/nodejs/node/issues/2382","id":131281310,"user":{"login":"mscdex","id":54666,"avatar_url":"https://avatars.githubusercontent.com/u/54666?v=3","gravatar_id":"","url":"https://api.github.com/users/mscdex","html_url":"https://github.com/mscdex","followers_url":"https://api.github.com/users/mscdex/followers","following_url":"https://api.github.com/users/mscdex/following{/other_user}","gists_url":"https://api.github.com/users/mscdex/gists{/gist_id}","starred_url":"https://api.github.com/users/mscdex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mscdex/subscriptions","organizations_url":"https://api.github.com/users/mscdex/orgs","repos_url":"https://api.github.com/users/mscdex/repos","events_url":"https://api.github.com/users/mscdex/events{/privacy}","received_events_url":"https://api.github.com/users/mscdex/received_events","type":"User","site_admin":false},"created_at":"2015-08-15T02:34:51Z","updated_at":"2015-08-15T02:34:51Z","body":"Huh... I see an `ECONNRESET`, not `EPROTOTYPE` on node master."}}