{"action":"opened","issue":{"url":"https://api.github.com/repos/joyent/node/issues/9337","labels_url":"https://api.github.com/repos/joyent/node/issues/9337/labels{/name}","comments_url":"https://api.github.com/repos/joyent/node/issues/9337/comments","events_url":"https://api.github.com/repos/joyent/node/issues/9337/events","html_url":"https://github.com/joyent/node/issues/9337","id":59940851,"number":9337,"title":"undefined is not a function in _http_outgoing.js#OutgoingMessage.end()","user":{"login":"phanect","id":315601,"avatar_url":"https://avatars.githubusercontent.com/u/315601?v=3","gravatar_id":"","url":"https://api.github.com/users/phanect","html_url":"https://github.com/phanect","followers_url":"https://api.github.com/users/phanect/followers","following_url":"https://api.github.com/users/phanect/following{/other_user}","gists_url":"https://api.github.com/users/phanect/gists{/gist_id}","starred_url":"https://api.github.com/users/phanect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phanect/subscriptions","organizations_url":"https://api.github.com/users/phanect/orgs","repos_url":"https://api.github.com/users/phanect/repos","events_url":"https://api.github.com/users/phanect/events{/privacy}","received_events_url":"https://api.github.com/users/phanect/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-05T11:44:58Z","updated_at":"2015-03-05T11:44:58Z","closed_at":null,"body":"I experienced following error. This seems happening in _http_outgoing.js.\r\n\r\n(Node version: 0.12.0, installed via NVM; OS: Kubuntu 14.10)\r\n\r\n```javascript\r\nTypeError: undefined is not a function\r\n    at OutgoingMessage.end (undefined is not a function:529:10)\r\n    at allFailed (/home/phanect/dev/notel-api/node_modules/geddy-passport/node_modules/passport/lib/middleware/authenticate.js:155:11)\r\n    at attempt (/home/phanect/dev/notel-api/node_modules/geddy-passport/node_modules/passport/lib/middleware/authenticate.js:161:28)\r\n    at Strategy.strategy.fail (/home/phanect/dev/notel-api/node_modules/geddy-passport/node_modules/passport/lib/middleware/authenticate.js:278:9)\r\n    at Strategy.authenticate (/home/phanect/dev/notel-api/node_modules/geddy-passport/node_modules/passport-local/lib/strategy.js:75:17)\r\n    at attempt (/home/phanect/dev/notel-api/node_modules/geddy-passport/node_modules/passport/lib/middleware/authenticate.js:342:16)\r\n    at authenticate (/home/phanect/dev/notel-api/node_modules/geddy-passport/node_modules/passport/lib/middleware/authenticate.js:343:7)\r\n    at /home/phanect/dev/notel-api/node_modules/geddy-passport/lib/passport/index.js:54:44\r\n    at Object.exports.login (/home/phanect/dev/notel-api/node_modules/geddy-passport/lib/passport/index.js:51:10)\r\n    at login (/home/phanect/dev/notel-api/app/controllers/auth.js:9:12)\r\n```\r\n\r\nIt occurs when I run\r\n\r\n```javascript\r\nres.end('Bad Request');\r\n```\r\n\r\n`res` object is Node.js standard HTTP response object:\r\n\r\n```javascript\r\n{ resp: \r\n   { domain: \r\n      { domain: null,\r\n        _events: [Object],\r\n        _maxListeners: undefined,\r\n        members: [Object] },\r\n     _events: { prefinish: [Function: resOnFinish], finish: [Object] },\r\n     _maxListeners: undefined,\r\n     output: [],\r\n     outputEncodings: [],\r\n     outputCallbacks: [],\r\n     writable: true,\r\n     _last: false,\r\n     chunkedEncoding: false,\r\n     shouldKeepAlive: true,\r\n     useChunkedEncodingByDefault: true,\r\n     sendDate: true,\r\n     _removedHeader: {},\r\n     _hasBody: true,\r\n     _trailer: '',\r\n     finished: false,\r\n     _hangupClose: false,\r\n     _headerSent: false,\r\n     socket: \r\n      { _connecting: false,\r\n        _hadError: false,\r\n        _handle: [Object],\r\n        _host: null,\r\n        _readableState: [Object],\r\n        readable: true,\r\n        domain: null,\r\n        _events: [Object],\r\n        _maxListeners: undefined,\r\n        _writableState: [Object],\r\n        writable: true,\r\n        allowHalfOpen: true,\r\n        destroyed: false,\r\n        bytesRead: 203,\r\n        _bytesDispatched: 0,\r\n        _pendingData: null,\r\n        _pendingEncoding: '',\r\n        server: [Object],\r\n        _idleTimeout: 120000,\r\n        _idleNext: [Object],\r\n        _idlePrev: [Object],\r\n        _idleStart: 17565079,\r\n        parser: [Object],\r\n        _paused: false,\r\n        read: [Function],\r\n        _consuming: true,\r\n        _httpMessage: [Circular] },\r\n     connection: \r\n      { _connecting: false,\r\n        _hadError: false,\r\n        _handle: [Object],\r\n        _host: null,\r\n        _readableState: [Object],\r\n        readable: true,\r\n        domain: null,\r\n        _events: [Object],\r\n        _maxListeners: undefined,\r\n        _writableState: [Object],\r\n        writable: true,\r\n        allowHalfOpen: true,\r\n        destroyed: false,\r\n        bytesRead: 203,\r\n        _bytesDispatched: 0,\r\n        _pendingData: null,\r\n        _pendingEncoding: '',\r\n        server: [Object],\r\n        _idleTimeout: 120000,\r\n        _idleNext: [Object],\r\n        _idlePrev: [Object],\r\n        _idleStart: 17565079,\r\n        parser: [Object],\r\n        _paused: false,\r\n        read: [Function],\r\n        _consuming: true,\r\n        _httpMessage: [Circular] },\r\n     _header: null,\r\n     _headers: null,\r\n     _headerNames: {} },\r\n  domain: \r\n   { domain: null,\r\n     _events: { error: [Function] },\r\n     _maxListeners: undefined,\r\n     members: [ [Object], [Object] ] },\r\n  _events: \r\n   { prefinish: [Function: resOnFinish],\r\n     finish: [ [Function], [Function] ] },\r\n  _maxListeners: undefined,\r\n  output: [],\r\n  outputEncodings: [],\r\n  outputCallbacks: [],\r\n  writable: true,\r\n  _last: false,\r\n  chunkedEncoding: false,\r\n  shouldKeepAlive: true,\r\n  useChunkedEncodingByDefault: true,\r\n  sendDate: true,\r\n  _removedHeader: {},\r\n  _hasBody: true,\r\n  _trailer: '',\r\n  finished: false,\r\n  _hangupClose: false,\r\n  _headerSent: false,\r\n  socket: \r\n   { _connecting: false,\r\n     _hadError: false,\r\n     _handle: \r\n      { fd: 15,\r\n        reading: true,\r\n        owner: [Circular],\r\n        onread: [Function: onread],\r\n        onconnection: null,\r\n        writeQueueSize: 0 },\r\n     _host: null,\r\n     _readableState: \r\n      { objectMode: false,\r\n        highWaterMark: 16384,\r\n        buffer: [],\r\n        length: 0,\r\n        pipes: null,\r\n        pipesCount: 0,\r\n        flowing: true,\r\n        ended: false,\r\n        endEmitted: false,\r\n        reading: true,\r\n        sync: false,\r\n        needReadable: true,\r\n        emittedReadable: false,\r\n        readableListening: false,\r\n        defaultEncoding: 'utf8',\r\n        ranOut: false,\r\n        awaitDrain: 0,\r\n        readingMore: false,\r\n        decoder: null,\r\n        encoding: null,\r\n        resumeScheduled: false },\r\n     readable: true,\r\n     domain: null,\r\n     _events: \r\n      { end: [Object],\r\n        finish: [Function: onSocketFinish],\r\n        _socketEnd: [Function: onSocketEnd],\r\n        drain: [Object],\r\n        timeout: [Function],\r\n        error: [Function: socketOnError],\r\n        close: [Object],\r\n        data: [Function: socketOnData] },\r\n     _maxListeners: undefined,\r\n     _writableState: \r\n      { objectMode: false,\r\n        highWaterMark: 16384,\r\n        needDrain: false,\r\n        ending: false,\r\n        ended: false,\r\n        finished: false,\r\n        decodeStrings: false,\r\n        defaultEncoding: 'utf8',\r\n        length: 0,\r\n        writing: false,\r\n        corked: 0,\r\n        sync: true,\r\n        bufferProcessing: false,\r\n        onwrite: [Function],\r\n        writecb: null,\r\n        writelen: 0,\r\n        bufferedRequest: null,\r\n        lastBufferedRequest: null,\r\n        pendingcb: 0,\r\n        prefinished: false,\r\n        errorEmitted: false },\r\n     writable: true,\r\n     allowHalfOpen: true,\r\n     destroyed: false,\r\n     bytesRead: 203,\r\n     _bytesDispatched: 0,\r\n     _pendingData: null,\r\n     _pendingEncoding: '',\r\n     server: \r\n      { domain: null,\r\n        _events: [Object],\r\n        _maxListeners: undefined,\r\n        _connections: 1,\r\n        _handle: [Object],\r\n        _usingSlaves: false,\r\n        _slaves: [],\r\n        allowHalfOpen: true,\r\n        pauseOnConnect: false,\r\n        httpAllowHalfOpen: false,\r\n        timeout: 120000,\r\n        _connectionKey: '4:127.0.0.1:4000' },\r\n     _idleTimeout: 120000,\r\n     _idleNext: { _idleNext: [Circular], _idlePrev: [Circular] },\r\n     _idlePrev: { _idleNext: [Circular], _idlePrev: [Circular] },\r\n     _idleStart: 17565079,\r\n     parser: \r\n      { '0': [Function: parserOnHeaders],\r\n        '1': [Function: parserOnHeadersComplete],\r\n        '2': [Function: parserOnBody],\r\n        '3': [Function: parserOnMessageComplete],\r\n        _headers: [],\r\n        _url: '',\r\n        socket: [Circular],\r\n        incoming: [Object],\r\n        maxHeaderPairs: 2000,\r\n        onIncoming: [Function: parserOnIncoming] },\r\n     _paused: false,\r\n     read: [Function],\r\n     _consuming: true,\r\n     _httpMessage: \r\n      { domain: [Object],\r\n        _events: [Object],\r\n        _maxListeners: undefined,\r\n        output: [],\r\n        outputEncodings: [],\r\n        outputCallbacks: [],\r\n        writable: true,\r\n        _last: false,\r\n        chunkedEncoding: false,\r\n        shouldKeepAlive: true,\r\n        useChunkedEncodingByDefault: true,\r\n        sendDate: true,\r\n        _removedHeader: {},\r\n        _hasBody: true,\r\n        _trailer: '',\r\n        finished: false,\r\n        _hangupClose: false,\r\n        _headerSent: false,\r\n        socket: [Circular],\r\n        connection: [Circular],\r\n        _header: null,\r\n        _headers: null,\r\n        _headerNames: {} } },\r\n  connection: \r\n   { _connecting: false,\r\n     _hadError: false,\r\n     _handle: \r\n      { fd: 15,\r\n        reading: true,\r\n        owner: [Circular],\r\n        onread: [Function: onread],\r\n        onconnection: null,\r\n        writeQueueSize: 0 },\r\n     _host: null,\r\n     _readableState: \r\n      { objectMode: false,\r\n        highWaterMark: 16384,\r\n        buffer: [],\r\n        length: 0,\r\n        pipes: null,\r\n        pipesCount: 0,\r\n        flowing: true,\r\n        ended: false,\r\n        endEmitted: false,\r\n        reading: true,\r\n        sync: false,\r\n        needReadable: true,\r\n        emittedReadable: false,\r\n        readableListening: false,\r\n        defaultEncoding: 'utf8',\r\n        ranOut: false,\r\n        awaitDrain: 0,\r\n        readingMore: false,\r\n        decoder: null,\r\n        encoding: null,\r\n        resumeScheduled: false },\r\n     readable: true,\r\n     domain: null,\r\n     _events: \r\n      { end: [Object],\r\n        finish: [Function: onSocketFinish],\r\n        _socketEnd: [Function: onSocketEnd],\r\n        drain: [Object],\r\n        timeout: [Function],\r\n        error: [Function: socketOnError],\r\n        close: [Object],\r\n        data: [Function: socketOnData] },\r\n     _maxListeners: undefined,\r\n     _writableState: \r\n      { objectMode: false,\r\n        highWaterMark: 16384,\r\n        needDrain: false,\r\n        ending: false,\r\n        ended: false,\r\n        finished: false,\r\n        decodeStrings: false,\r\n        defaultEncoding: 'utf8',\r\n        length: 0,\r\n        writing: false,\r\n        corked: 0,\r\n        sync: true,\r\n        bufferProcessing: false,\r\n        onwrite: [Function],\r\n        writecb: null,\r\n        writelen: 0,\r\n        bufferedRequest: null,\r\n        lastBufferedRequest: null,\r\n        pendingcb: 0,\r\n        prefinished: false,\r\n        errorEmitted: false },\r\n     writable: true,\r\n     allowHalfOpen: true,\r\n     destroyed: false,\r\n     bytesRead: 203,\r\n     _bytesDispatched: 0,\r\n     _pendingData: null,\r\n     _pendingEncoding: '',\r\n     server: \r\n      { domain: null,\r\n        _events: [Object],\r\n        _maxListeners: undefined,\r\n        _connections: 1,\r\n        _handle: [Object],\r\n        _usingSlaves: false,\r\n        _slaves: [],\r\n        allowHalfOpen: true,\r\n        pauseOnConnect: false,\r\n        httpAllowHalfOpen: false,\r\n        timeout: 120000,\r\n        _connectionKey: '4:127.0.0.1:4000' },\r\n     _idleTimeout: 120000,\r\n     _idleNext: { _idleNext: [Circular], _idlePrev: [Circular] },\r\n     _idlePrev: { _idleNext: [Circular], _idlePrev: [Circular] },\r\n     _idleStart: 17565079,\r\n     parser: \r\n      { '0': [Function: parserOnHeaders],\r\n        '1': [Function: parserOnHeadersComplete],\r\n        '2': [Function: parserOnBody],\r\n        '3': [Function: parserOnMessageComplete],\r\n        _headers: [],\r\n        _url: '',\r\n        socket: [Circular],\r\n        incoming: [Object],\r\n        maxHeaderPairs: 2000,\r\n        onIncoming: [Function: parserOnIncoming] },\r\n     _paused: false,\r\n     read: [Function],\r\n     _consuming: true,\r\n     _httpMessage: \r\n      { domain: [Object],\r\n        _events: [Object],\r\n        _maxListeners: undefined,\r\n        output: [],\r\n        outputEncodings: [],\r\n        outputCallbacks: [],\r\n        writable: true,\r\n        _last: false,\r\n        chunkedEncoding: false,\r\n        shouldKeepAlive: true,\r\n        useChunkedEncodingByDefault: true,\r\n        sendDate: true,\r\n        _removedHeader: {},\r\n        _hasBody: true,\r\n        _trailer: '',\r\n        finished: false,\r\n        _hangupClose: false,\r\n        _headerSent: false,\r\n        socket: [Circular],\r\n        connection: [Circular],\r\n        _header: null,\r\n        _headers: null,\r\n        _headerNames: {} } },\r\n  _header: null,\r\n  _headers: null,\r\n  _headerNames: {},\r\n  _geddyId: '324F5C83-4BC0-4C8D-A708-8346283BFB7F',\r\n  controller: \r\n   { login: [Function],\r\n     app: \r\n      { config: [Object],\r\n        router: [Object],\r\n        modelRegistry: {},\r\n        templateRegistry: [Object],\r\n        controllerRegistry: {},\r\n        init: [Function],\r\n        handleControllerAction: [Function],\r\n        handleStaticFile: [Function],\r\n        handleMethodNotAllowed: [Function],\r\n        handleNotFound: [Function],\r\n        handleNoMatchedRoute: [Function],\r\n        handleNoAction: [Function],\r\n        handleNoController: [Function],\r\n        start: [Function],\r\n        viewHelpers: [Object],\r\n        mailer: [Object] },\r\n     url: '/api/auth/login/local',\r\n     method: 'POST',\r\n     params: \r\n      { method: 'POST',\r\n        controller: 'Auth',\r\n        action: 'login',\r\n        strategy: 'local',\r\n        username: '09001234567',\r\n        password: 'notel' },\r\n     accessTime: 1425554952098,\r\n     request: \r\n      { _readableState: [Object],\r\n        readable: false,\r\n        domain: [Object],\r\n        _events: [Object],\r\n        _maxListeners: undefined,\r\n        socket: [Object],\r\n        connection: [Object],\r\n        httpVersionMajor: 1,\r\n        httpVersionMinor: 1,\r\n        httpVersion: '1.1',\r\n        complete: true,\r\n        headers: [Object],\r\n        rawHeaders: [Object],\r\n        trailers: {},\r\n        rawTrailers: [],\r\n        _pendings: [],\r\n        _pendingIndex: 0,\r\n        upgrade: false,\r\n        url: '/api/auth/login/local',\r\n        method: 'POST',\r\n        statusCode: null,\r\n        statusMessage: null,\r\n        client: [Object],\r\n        _consuming: true,\r\n        _dumped: false,\r\n        query: {},\r\n        _geddyId: '324F5C83-4BC0-4C8D-A708-8346283BFB7F',\r\n        controller: [Circular],\r\n        read: [Function],\r\n        body: 'username=09001234567&password=notel',\r\n        session: {} },\r\n     response: [Circular],\r\n     name: 'Auth',\r\n     cookies: { collection: {} },\r\n     i18n: \r\n      { getLocale: [Function],\r\n        setLocale: [Function],\r\n        getText: [Function],\r\n        t: [Function] },\r\n     getLocale: [Function],\r\n     setLocale: [Function],\r\n     session: \r\n      { id: 'ECCNVRLkCIAh76fCqXFOwHxAnMsZ6or6ClaEYXZeKdoHRHTz5uCaYN1UoG7fs5QXZ8yqpO5ll9AbjUqdSnGfzdV1c1eTosWxiMEPR4WU8AuHBM53UEwcuhaAIj6l4jsP',\r\n        expiry: 1209600000,\r\n        cookies: [Object],\r\n        accessTime: 1425554952098,\r\n        data: {},\r\n        flash: [Object] },\r\n     flash: \r\n      { session: [Object],\r\n        used: [],\r\n        messages: {},\r\n        messagesArr: [],\r\n        config: undefined },\r\n     sameOriginToken: '459dc5b3a0ba49b344ca5b9c24657b90ced0ea86' } }\r\n```\r\n\r\nAbove info may not be enough. Can you tell me what additional info is required?"}}