Skip to content

EPROTOTYPE when responding early to large http request #2382

Description

@LinusU

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' }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.httpIssues and PRs related to the http subsystem.macosIssues and PRs related to the macOS platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions