Skip to content

abortConnection with code == null #502

@miki131

Description

@miki131

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug
  • request a feature

Current behaviour

Steps to reproduce (if the current behaviour is a bug)

io.set('origins', ''domain1.dev:*');

Then connect from another domain2.dev

Expected behaviour

According to abortConnection function 400 Bad Request exception should be thrown

Setup

  • OS:
  • browser:
  • engine.io version: 1.8.3
  • node version: v7.8.0

Other information (e.g. stacktraces, related issues, suggestions how to fix)

buffer.js:362
    throw new TypeError('"string" must be a string, Buffer, or ArrayBuffer');
    ^

TypeError: "string" must be a string, Buffer, or ArrayBuffer
    at Function.byteLength (buffer.js:362:11)
    at abortConnection (/home/app/node_modules/engine.io/lib/server.js:471:25)
    at /home/app/node_modules/engine.io/lib/server.js:326:7
    at Server.checkRequest (/home/app/node_modules/socket.io/lib/index.js:85:3)
    at Server.verify (/home/app/node_modules/engine.io/lib/server.js:151:17)
    at Server.handleUpgrade (/home/app/node_modules/engine.io/lib/server.js:323:8)
    at Server.<anonymous> (/home/app/node_modules/engine.io/lib/server.js:444:14)
    at emitThree (events.js:116:13)
    at Server.emit (events.js:197:7)
    at onParserExecuteCommon (_http_server.js:462:14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions