Doesn't work with Express.js

I wrote simple Express app and got an error.
var fs = require('fs');
var express = require('express');
var app = express();

app.get('/', function (req, res) {
  res.send('hello!')
})

var options = {
  key: fs.readFileSync('./ssl/key.pem'),
  cert: fs.readFileSync('./ssl/cert.pem')
};

require('http2').createServer(options, app).listen(8080);
// require('https').createServer(options, app).listen(8080);// https module works well

_stream_readable.js:505
    dest.end();
         ^
TypeError: undefined is not a function
    at Stream.onend (_stream_readable.js:505:10)
    at Stream.g (events.js:199:16)
    at Stream.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

Is that a node-http2's matter or Node's one?
It is hard to debug for me...
Node: v0.12.0
node-http2: v3.2.0
express: v4.11.2

I'm getting the same error.

Thanks for reporting. This would indeed be nice. I expect to have some time to look into this in about a week. Feel free to send pull requests if you happen to find the root if the issue.

Now I found it not easy to fix...
Express replaces the request's __proto__ with another object which is similar to IncomingMessage but is not a Stream.
https://github.com/strongloop/express/blob/master/lib/middleware/init.js#L18-L19
So, your IncomingMessage inherits PassThrough at first but soon loses end method.
Maybe other methods are broken too.

Thanks for digging deeper! I don't have an idea for a fix yet, but will be thinking about possible solutions...

Please feel free to open a new bug report in Express.js as well, if there is something we can fix or change to make it work better with http2!

In node-http2, all of the features can be implemented without relying on inheritance, even without performance loss. Both the IncomingMessage class and inheriting from PassThrough is just convenience, they are not necessary. In contrast, in express, implementing the object augmentation without mangling the proto would result in performance loss. But it needs some work, and the code will be somewhat uglier... I'm still thinking about a prettier solution.

So, although IncomingMessage and PassThrough are avoidable, both IncomingRequest and IncomingResponse are necessary (or avoidable only with performance penalty). And the protos belonging to these classes would be replaced by express on instances...
Maybe express could check if the proto that it wants to replace is really the built-in IncomingMessage, and if not, it would just copy the augmentation methods to the instance itself instead of the proto replacement. It would be a performance penalty, but only when used with node-http2 (or other alternative HTTP API implementation). @dougwilson what do you think?

So if the only reason why http2 doesn't work with Express is because of this prototype stuff, then it should be fixed in 5.0 this summer.
If we are brainstorming on a method to get it into 4.x and also keep backwards compatibility, then we can and a PR would be welcome :) Some things to think of is that with sub apps, we don't know the prototype we want to replace, so you would need to walk down the entire chain searching for IncomingRequest. We also need to think about how to handle things like non-configurable properties, where today there is no issue and Express will overwrite them, but changing to a non-proto-replacement may cause different behavior or errors for people.
In Express 5 we are moving to prototype injection over replacement, though it's not backwards compatible.

Also we need to consider that if we put things on the instance itself, it'll change behavior of people doing Object.keys() or hasOwnProperty and the like, so we have to take that into consideration as well, if this change when using http2 will cause issues in various existing middleware modules.

I would be happy with 5.0 as a solution without support for 4.x.
But, what do you mean by prototype injection? If it is var originalPrototype = req.__proto__; req.__proto__ = app.request; app.request.__proto__ = originalPrototype; then I don't think it would solve the problem.

It would not be that code, since that code would not allow for the co-existence of http2 and node.js core requests on the same express app, which is something we want.

Yeah, it's pretty tricky to implement this thing properly. If express is going to do something like this, then I think both http2 and http1 would work: maintain a map of observed protos (in this case, the built-in IncomingMessage, and node-http2 IncomingRequest), and make a separate injectable proto object for each of them, and always inject the appropriate one. It's up to you of course, just thinking about the proper way of implementing this...

One problem with the mapped idea is that we would have to take a dependency on http2 and then, for equality to work, people would have to only use the same version of http2 on which express is getting the http2 prototype reference from.

Yes if the map is static. But it could start as empty (or preloaded with
the builtin http1 IncomingMessage), and dynamically filled up with
proto->injectable_proto mappings as new protos are observed, since it's
easy to create such injectable_protos on the fly.
But anyway, this is probably not the right place to talk about it. Should I
open a ticket in express to keep track of this?
2015.05.03. 21:15 ezt írta ("Douglas Christopher Wilson" <
notifications@github.com>):

One problem with the mapped idea is that we would have to take a
dependency on http2 and then, for equality to work, people would have to
only use the same version of http2 on which express is getting the http2
prototype reference from.
—
Reply to this email directly or view it on GitHub
https://github.com/molnarg/node-http2/issues/100#issuecomment-98526611.

There is already an open issue in Express that is linked to this issue.

@dougwilson would be helpful if you have posted a link here

Related Express issue:
https://github.com/strongloop/express/issues/2364

@crepererum for some reason that issue was locked and is only available for discussion for collaborators :-1:

@olalonde Well let's hope that means something is being done about it.  This pretty much breaks HTTP/2's implementation into ExpressJS, further holding back nodeJS applications to HTTP/1.1
I'm actually surprised that it's taking this long to get a reliable implementation of HTTP/2 going.

@stanier me too. Surprised core node doesn't support HTTP2 already.

@ralph3991 imho, Joyent's node has been slower on releases.  I'm more surprised that io.js hasn't made a decision on it.  They seem rather in limbo on how to deal with it.

@stanier wow, I didn't even know that existed. Thank you. I checked it out and it looks much better than node for the cutting edge. Yeah id have to agree again, they support ECMAScript 6 but not HTTP2? Hmm. I'm just happy rfc7540 is finally finished and developers can start making final releases. I checked out https://github.com/molnarg/node-http2 but they are still on Draft 16 :(

@ralph3991 not true, as of v3.2.0, node-http2 advertises h2, not draft 16 (any documents that say otherwise are just out of date - pull requests welcome to fix it!)
Also, this conversation is quite the derail from the actual purpose of this issue. If it continues, I may have to lock the issue.

:+1:

any updates on this? last comment on the express thread is to raise the issue here, does not sound like they are going to fix. in the meantime we're using connect directly

This is because people are linking to the wrong thread in the Express repo; the correct thread is listed right at the top of this issue:

There is no backwards-compatible way to fix this in Express, so without anything happening here, it won't be until Express 5.0 that this module (and any other server that does not inherit from Node.js core http prototype) will work with Express.

@molnarg, is a solution being worked on in this repo, or are we to wait for Express v5 and hope it resolves any issues?

@CodeTheInternet, assume that responsibility for the issue is being thrown on @strongloop

+1

Currently using express 4.x
var fs = require('fs');
var spdy = require('spdy');
var express = require("express");
var app = express();

var https = require('https');
var http = require('http');

var key = fs.readFileSync(__dirname + '/website.key');
var crt = fs.readFileSync(__dirname + '/website.crt');
var ca  = fs.readFileSync(__dirname + '/website.ca-bundle.crt');

var credentials = {
    key: key.toString(),
    cert: crt.toString(),
    ca: ca.toString()
}

http.createServer(app).listen(80);
spdy.createServer(credentials, app).listen(443);

I can get the server to boot and run on https but unsure as to how I can utilize req.push correctly.
I tried using this:
var fs = require('fs');
var jqueryCache = fs.readFileSync(__dirname + '/jquery.js');

app.use(function(req, res, next)
{
	if(req.url == '/jquery.js')
	{
		var stream = res.push('/jquery.js', {response:{'content-type': 'application/javascript'}});

		stream.on('acknowledge', function() {});
		stream.on('error', function() {});

		stream.end(jqueryCache.toString('utf8'));

		res.end('<script src="/jquery.js"></script>');
	}
});

But the results do not seem to reflect the correct behavior.
Also, keep in mind spdy will not work on older versions of nodejs. I was using 0.10.36 and ran into spdy ssl issues. Upgraded to 0.12.6 and everything works fine.

Please ignore my last comment - apologies.

I would like to create an example with this dependency.
What Router library similar to express does exist and it doesn't have any problem?

@jabrena connect seems to work fine with it

Using:
"express": "^5.0.0-alpha.2",
"http2": "^3.3.4",

const http2 = require('http2');
const express = require('express');
const yargs = require('yargs');
const path = require('path');
const fs = require('fs');

const argv = yargs
      .help()
    .strict()
    .options({
        port: {
            default: 8000,
            demand: true,
            type: 'number'
        }
    })
    .argv;

process.on('unhandledRejection', (reason, promise) => {
    /* eslint-disable no-console */
    console.log('Unhandled RejectionPromise');
    console.log('promise', promise);
    console.log('reason', reason);
    console.log('reason.stack', reason.stack);
    /* eslint-enable */
});

const app = express();

app.get('/', (req, res) => {
    res.json({foo: 'test'});
});

/* eslint-disable no-console, no-unused-vars */
app.use((err, req, res, next) => {
    console.error(err.stack);
    /* eslint-enable */

    res
        .status(500)
        .send('Internal Server Error');
});

http2
    .createServer({
        log: require('bunyan').createLogger({name: 'myapp'}),
        key: fs.readFileSync(path.resolve(__dirname, './localhost.key')),
        cert: fs.readFileSync(path.resolve(__dirname, './localhost.crt'))
    }, app)
    .listen(argv.port, (err) => {
        if (err) {
            throw new Error(err);
        }

        /* eslint-disable no-console */
        console.log('Listening on port: ' + argv.port + '.');
        /* eslint-enable no-console */
    });

Does not work.
The complete log output:
➜  showtime-app git:(master) ✗ node ./bin/src/index-babel.js | bunyan
[2016-05-06T11:29:43.622Z]  INFO: myapp/http/6154 on opprtunity: Creating HTTP/2 server over TLS
[2016-05-06T11:29:43.634Z]  INFO: myapp/http/6154 on opprtunity: Listening for incoming connections (on=8000)
Listening on port: 8000.
[2016-05-06T11:29:49.861Z]  INFO: myapp/http/6154 on opprtunity: New incoming HTTP/2 connection (client=::ffff:<IP_ADDRESS>:58954, SNI=false)
    e: {
      "_readableState": {
        "objectMode": false,
        "highWaterMark": 16384,
        "buffer": [],
        "length": 0,
        "pipes": null,
        "pipesCount": 0,
        "flowing": null,
        "ended": false,
        "endEmitted": false,
        "reading": false,
        "sync": true,
        "needReadable": false,
        "emittedReadable": false,
        "readableListening": false,
        "resumeScheduled": false,
        "defaultEncoding": "utf8",
        "ranOut": false,
        "awaitDrain": 0,
        "readingMore": false,
        "decoder": null,
        "encoding": null
      },
      "readable": true,
      "domain": null,
      "_events": {},
      "_eventsCount": 1,
      "_writableState": {
        "objectMode": false,
        "highWaterMark": 16384,
        "needDrain": false,
        "ending": false,
        "ended": false,
        "finished": false,
        "decodeStrings": true,
        "defaultEncoding": "utf8",
        "length": 0,
        "writing": false,
        "corked": 0,
        "sync": true,
        "bufferProcessing": false,
        "writecb": null,
        "writelen": 0,
        "bufferedRequest": null,
        "lastBufferedRequest": null,
        "pendingcb": 0,
        "prefinished": false,
        "errorEmitted": false,
        "bufferedRequestCount": 0,
        "corkedRequestsFree": {
          "next": null,
          "entry": null
        }
      },
      "writable": true,
      "allowHalfOpen": true,
      "_log": {
        "domain": null,
        "_events": {},
        "_eventsCount": 0,
        "_level": 30,
        "streams": [
          {
            "type": "stream",
            "stream": {
              "_connecting": false,
              "_hadError": false,
              "_handle": {
                "bytesRead": 0,
                "_externalStream": {},
                "fd": 1,
                "writeQueueSize": 0,
                "owner": "[Circular]"
              },
              "_parent": null,
              "_host": null,
              "_readableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "buffer": [],
                "length": 0,
                "pipes": null,
                "pipesCount": 0,
                "flowing": null,
                "ended": false,
                "endEmitted": false,
                "reading": false,
                "sync": true,
                "needReadable": false,
                "emittedReadable": false,
                "readableListening": false,
                "resumeScheduled": false,
                "defaultEncoding": "utf8",
                "ranOut": false,
                "awaitDrain": 0,
                "readingMore": false,
                "decoder": null,
                "encoding": null
              },
              "readable": false,
              "domain": null,
              "_events": {},
              "_eventsCount": 3,
              "_writableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "needDrain": false,
                "ending": false,
                "ended": false,
                "finished": false,
                "decodeStrings": false,
                "defaultEncoding": "utf8",
                "length": 0,
                "writing": false,
                "corked": 0,
                "sync": false,
                "bufferProcessing": false,
                "writecb": null,
                "writelen": 0,
                "bufferedRequest": null,
                "lastBufferedRequest": null,
                "pendingcb": 0,
                "prefinished": false,
                "errorEmitted": false,
                "bufferedRequestCount": 0,
                "corkedRequestsFree": {
                  "next": null,
                  "entry": null
                }
              },
              "writable": true,
              "allowHalfOpen": false,
              "destroyed": false,
              "_bytesDispatched": 362,
              "_sockname": null,
              "_writev": null,
              "_pendingData": null,
              "_pendingEncoding": "",
              "server": null,
              "_server": null,
              "_type": "pipe",
              "fd": 1,
              "_isStdio": true
            },
            "closeOnExit": false,
            "level": 30,
            "raw": false
          }
        ],
        "serializers": null,
        "src": false,
        "fields": {
          "name": "myapp",
          "hostname": "opprtunity",
          "pid": 6154,
          "component": "endpoint",
          "e": "[Circular]"
        }
      },
      "_serializer": {
        "_log": {
          "domain": null,
          "_events": {},
          "_eventsCount": 0,
          "_level": 30,
          "streams": [
            {
              "type": "stream",
              "stream": "[Circular]",
              "closeOnExit": false,
              "level": 30,
              "raw": false
            }
          ],
          "serializers": null,
          "src": false,
          "fields": {
            "name": "myapp",
            "hostname": "opprtunity",
            "pid": 6154,
            "component": "serializer",
            "e": "[Circular]"
          }
        },
        "_readableState": {
          "objectMode": true,
          "highWaterMark": 16,
          "buffer": [],
          "length": 0,
          "pipes": null,
          "pipesCount": 0,
          "flowing": null,
          "ended": false,
          "endEmitted": false,
          "reading": false,
          "sync": false,
          "needReadable": true,
          "emittedReadable": false,
          "readableListening": false,
          "resumeScheduled": false,
          "defaultEncoding": "utf8",
          "ranOut": false,
          "awaitDrain": 0,
          "readingMore": false,
          "decoder": null,
          "encoding": null
        },
        "readable": true,
        "domain": null,
        "_events": {
          "error": [
            null,
            null
          ]
        },
        "_eventsCount": 7,
        "_writableState": {
          "objectMode": true,
          "highWaterMark": 16,
          "needDrain": false,
          "ending": false,
          "ended": false,
          "finished": false,
          "decodeStrings": true,
          "defaultEncoding": "utf8",
          "length": 0,
          "writing": false,
          "corked": 0,
          "sync": true,
          "bufferProcessing": false,
          "writecb": null,
          "writelen": 0,
          "bufferedRequest": null,
          "lastBufferedRequest": null,
          "pendingcb": 0,
          "prefinished": false,
          "errorEmitted": false,
          "bufferedRequestCount": 0,
          "corkedRequestsFree": {
            "next": null,
            "entry": null
          }
        },
        "writable": true,
        "allowHalfOpen": true,
        "_transformState": {
          "needTransform": false,
          "transforming": false,
          "writecb": null,
          "writechunk": null,
          "writeencoding": null
        }
      },
      "_deserializer": {
        "_log": {
          "domain": null,
          "_events": {},
          "_eventsCount": 0,
          "_level": 30,
          "streams": [
            {
              "type": "stream",
              "stream": "[Circular]",
              "closeOnExit": false,
              "level": 30,
              "raw": false
            }
          ],
          "serializers": null,
          "src": false,
          "fields": {
            "name": "myapp",
            "hostname": "opprtunity",
            "pid": 6154,
            "component": "deserializer",
            "e": "[Circular]"
          }
        },
        "_readableState": {
          "objectMode": true,
          "highWaterMark": 16,
          "buffer": [],
          "length": 0,
          "pipes": {
            "_readableState": {
              "objectMode": true,
              "highWaterMark": 16,
              "buffer": [],
              "length": 0,
              "pipes": {
                "_readableState": {
                  "objectMode": true,
                  "highWaterMark": 16,
                  "buffer": [
                    {
                      "type": "SETTINGS",
                      "flags": {
                        "ACK": false
                      },
                      "stream": 0,
                      "settings": {}
                    }
                  ],
                  "length": 1,
                  "pipes": {
                    "_readableState": {
                      "objectMode": true,
                      "highWaterMark": 16,
                      "buffer": [],
                      "length": 0,
                      "pipes": "[Circular]",
                      "pipesCount": 1,
                      "flowing": true,
                      "ended": false,
                      "endEmitted": false,
                      "reading": false,
                      "sync": false,
                      "needReadable": true,
                      "emittedReadable": false,
                      "readableListening": false,
                      "resumeScheduled": true,
                      "defaultEncoding": "utf8",
                      "ranOut": false,
                      "awaitDrain": 0,
                      "readingMore": false,
                      "decoder": null,
                      "encoding": null
                    },
                    "readable": true,
                    "domain": null,
                    "_events": {
                      "end": [
                        null,
                        null
                      ],
                      "error": [
                        null,
                        null
                      ]
                    },
                    "_eventsCount": 8,
                    "_writableState": {
                      "objectMode": true,
                      "highWaterMark": 16,
                      "needDrain": false,
                      "ending": false,
                      "ended": false,
                      "finished": false,
                      "decodeStrings": true,
                      "defaultEncoding": "utf8",
                      "length": 0,
                      "writing": false,
                      "corked": 0,
                      "sync": true,
                      "bufferProcessing": false,
                      "writecb": null,
                      "writelen": 0,
                      "bufferedRequest": null,
                      "lastBufferedRequest": null,
                      "pendingcb": 0,
                      "prefinished": false,
                      "errorEmitted": false,
                      "bufferedRequestCount": 0,
                      "corkedRequestsFree": {
                        "next": null,
                        "entry": null
                      }
                    },
                    "writable": true,
                    "allowHalfOpen": true,
                    "_transformState": {
                      "needTransform": false,
                      "transforming": false,
                      "writecb": null,
                      "writechunk": null,
                      "writeencoding": null
                    },
                    "_log": {
                      "domain": null,
                      "_events": {},
                      "_eventsCount": 0,
                      "_level": 30,
                      "streams": [
                        {
                          "type": "stream",
                          "stream": "[Circular]",
                          "closeOnExit": false,
                          "level": 30,
                          "raw": false
                        }
                      ],
                      "serializers": null,
                      "src": false,
                      "fields": {
                        "name": "myapp",
                        "hostname": "opprtunity",
                        "pid": 6154,
                        "component": "compressor",
                        "e": "[Circular]"
                      }
                    },
                    "_table": [
                      [
                        ":authority",
                        ""
                      ],
                      [
                        ":method",
                        "GET"
                      ],
                      [
                        ":method",
                        "POST"
                      ],
                      [
                        ":path",
                        "/"
                      ],
                      [
                        ":path",
                        "/index.html"
                      ],
                      [
                        ":scheme",
                        "http"
                      ],
                      [
                        ":scheme",
                        "https"
                      ],
                      [
                        ":status",
                        "200"
                      ],
                      [
                        ":status",
                        "204"
                      ],
                      [
                        ":status",
                        "206"
                      ],
                      [
                        ":status",
                        "304"
                      ],
                      [
                        ":status",
                        "400"
                      ],
                      [
                        ":status",
                        "404"
                      ],
                      [
                        ":status",
                        "500"
                      ],
                      [
                        "accept-charset",
                        ""
                      ],
                      [
                        "accept-encoding",
                        "gzip, deflate"
                      ],
                      [
                        "accept-language",
                        ""
                      ],
                      [
                        "accept-ranges",
                        ""
                      ],
                      [
                        "accept",
                        ""
                      ],
                      [
                        "access-control-allow-origin",
                        ""
                      ],
                      [
                        "age",
                        ""
                      ],
                      [
                        "allow",
                        ""
                      ],
                      [
                        "authorization",
                        ""
                      ],
                      [
                        "cache-control",
                        ""
                      ],
                      [
                        "content-disposition",
                        ""
                      ],
                      [
                        "content-encoding",
                        ""
                      ],
                      [
                        "content-language",
                        ""
                      ],
                      [
                        "content-length",
                        ""
                      ],
                      [
                        "content-location",
                        ""
                      ],
                      [
                        "content-range",
                        ""
                      ],
                      [
                        "content-type",
                        ""
                      ],
                      [
                        "cookie",
                        ""
                      ],
                      [
                        "date",
                        ""
                      ],
                      [
                        "etag",
                        ""
                      ],
                      [
                        "expect",
                        ""
                      ],
                      [
                        "expires",
                        ""
                      ],
                      [
                        "from",
                        ""
                      ],
                      [
                        "host",
                        ""
                      ],
                      [
                        "if-match",
                        ""
                      ],
                      [
                        "if-modified-since",
                        ""
                      ],
                      [
                        "if-none-match",
                        ""
                      ],
                      [
                        "if-range",
                        ""
                      ],
                      [
                        "if-unmodified-since",
                        ""
                      ],
                      [
                        "last-modified",
                        ""
                      ],
                      [
                        "link",
                        ""
                      ],
                      [
                        "location",
                        ""
                      ],
                      [
                        "max-forwards",
                        ""
                      ],
                      [
                        "proxy-authenticate",
                        ""
                      ],
                      [
                        "proxy-authorization",
                        ""
                      ],
                      [
                        "range",
                        ""
                      ],
                      [
                        "referer",
                        ""
                      ],
                      [
                        "refresh",
                        ""
                      ],
                      [
                        "retry-after",
                        ""
                      ],
                      [
                        "server",
                        ""
                      ],
                      [
                        "set-cookie",
                        ""
                      ],
                      [
                        "strict-transport-security",
                        ""
                      ],
                      [
                        "transfer-encoding",
                        ""
                      ],
                      [
                        "user-agent",
                        ""
                      ],
                      [
                        "vary",
                        ""
                      ],
                      [
                        "via",
                        ""
                      ],
                      [
                        "www-authenticate",
                        ""
                      ]
                    ]
                  },
                  "pipesCount": 1,
                  "flowing": true,
                  "ended": false,
                  "endEmitted": false,
                  "reading": false,
                  "sync": true,
                  "needReadable": false,
                  "emittedReadable": false,
                  "readableListening": false,
                  "resumeScheduled": true,
                  "defaultEncoding": "utf8",
                  "ranOut": false,
                  "awaitDrain": 0,
                  "readingMore": true,
                  "decoder": null,
                  "encoding": null
                },
                "readable": true,
                "domain": null,
                "_events": {
                  "end": [
                    null,
                    null
                  ],
                  "error": [
                    null,
                    null
                  ]
                },
                "_eventsCount": 19,
                "_writableState": {
                  "objectMode": true,
                  "highWaterMark": 16,
                  "needDrain": false,
                  "ending": false,
                  "ended": false,
                  "finished": false,
                  "decodeStrings": true,
                  "defaultEncoding": "utf8",
                  "length": 0,
                  "writing": false,
                  "corked": 0,
                  "sync": true,
                  "bufferProcessing": false,
                  "writecb": null,
                  "writelen": 0,
                  "bufferedRequest": null,
                  "lastBufferedRequest": null,
                  "pendingcb": 0,
                  "prefinished": false,
                  "errorEmitted": false,
                  "bufferedRequestCount": 0,
                  "corkedRequestsFree": {
                    "next": null,
                    "entry": null
                  }
                },
                "writable": true,
                "allowHalfOpen": true,
                "_initialWindow": 65535,
                "_window": 65535,
                "_flowControlId": 0,
                "_queue": [],
                "_ended": false,
                "_received": 0,
                "_blocked": false,
                "_log": {
                  "domain": null,
                  "_events": {},
                  "_eventsCount": 0,
                  "_level": 30,
                  "streams": [
                    {
                      "type": "stream",
                      "stream": "[Circular]",
                      "closeOnExit": false,
                      "level": 30,
                      "raw": false
                    }
                  ],
                  "serializers": null,
                  "src": false,
                  "fields": {
                    "name": "myapp",
                    "hostname": "opprtunity",
                    "pid": 6154,
                    "component": "connection",
                    "e": "[Circular]"
                  }
                },
                "_streamIds": [
                  {
                    "upstream": {}
                  }
                ],
                "_streamPriorities": [],
                "_nextStreamId": 2,
                "_lastIncomingStream": 0,
                "_streamSlotsFree": null,
                "_streamLimit": null,
                "_pings": {},
                "_closed": false,
                "_initialStreamWindowSize": 65535,
                "_settingsAckCallbacks": [
                  null
                ],
                "_sendScheduled": false,
                "_firstFrameReceived": false
              },
              "pipesCount": 1,
              "flowing": true,
              "ended": false,
              "endEmitted": false,
              "reading": false,
              "sync": false,
              "needReadable": true,
              "emittedReadable": false,
              "readableListening": false,
              "resumeScheduled": true,
              "defaultEncoding": "utf8",
              "ranOut": false,
              "awaitDrain": 0,
              "readingMore": false,
              "decoder": null,
              "encoding": null
            },
            "readable": true,
            "domain": null,
            "_events": {
              "end": [
                null,
                null
              ],
              "error": [
                null,
                null
              ]
            },
            "_eventsCount": 8,
            "_writableState": {
              "objectMode": true,
              "highWaterMark": 16,
              "needDrain": false,
              "ending": false,
              "ended": false,
              "finished": false,
              "decodeStrings": true,
              "defaultEncoding": "utf8",
              "length": 0,
              "writing": false,
              "corked": 0,
              "sync": true,
              "bufferProcessing": false,
              "writecb": null,
              "writelen": 0,
              "bufferedRequest": null,
              "lastBufferedRequest": null,
              "pendingcb": 0,
              "prefinished": false,
              "errorEmitted": false,
              "bufferedRequestCount": 0,
              "corkedRequestsFree": {
                "next": null,
                "entry": null
              }
            },
            "writable": true,
            "allowHalfOpen": true,
            "_transformState": {
              "needTransform": false,
              "transforming": false,
              "writecb": null,
              "writechunk": null,
              "writeencoding": null
            },
            "_log": {
              "domain": null,
              "_events": {},
              "_eventsCount": 0,
              "_level": 30,
              "streams": [
                {
                  "type": "stream",
                  "stream": "[Circular]",
                  "closeOnExit": false,
                  "level": 30,
                  "raw": false
                }
              ],
              "serializers": null,
              "src": false,
              "fields": {
                "name": "myapp",
                "hostname": "opprtunity",
                "pid": 6154,
                "component": "compressor",
                "e": "[Circular]"
              }
            },
            "_table": [
              [
                ":authority",
                ""
              ],
              [
                ":method",
                "GET"
              ],
              [
                ":method",
                "POST"
              ],
              [
                ":path",
                "/"
              ],
              [
                ":path",
                "/index.html"
              ],
              [
                ":scheme",
                "http"
              ],
              [
                ":scheme",
                "https"
              ],
              [
                ":status",
                "200"
              ],
              [
                ":status",
                "204"
              ],
              [
                ":status",
                "206"
              ],
              [
                ":status",
                "304"
              ],
              [
                ":status",
                "400"
              ],
              [
                ":status",
                "404"
              ],
              [
                ":status",
                "500"
              ],
              [
                "accept-charset",
                ""
              ],
              [
                "accept-encoding",
                "gzip, deflate"
              ],
              [
                "accept-language",
                ""
              ],
              [
                "accept-ranges",
                ""
              ],
              [
                "accept",
                ""
              ],
              [
                "access-control-allow-origin",
                ""
              ],
              [
                "age",
                ""
              ],
              [
                "allow",
                ""
              ],
              [
                "authorization",
                ""
              ],
              [
                "cache-control",
                ""
              ],
              [
                "content-disposition",
                ""
              ],
              [
                "content-encoding",
                ""
              ],
              [
                "content-language",
                ""
              ],
              [
                "content-length",
                ""
              ],
              [
                "content-location",
                ""
              ],
              [
                "content-range",
                ""
              ],
              [
                "content-type",
                ""
              ],
              [
                "cookie",
                ""
              ],
              [
                "date",
                ""
              ],
              [
                "etag",
                ""
              ],
              [
                "expect",
                ""
              ],
              [
                "expires",
                ""
              ],
              [
                "from",
                ""
              ],
              [
                "host",
                ""
              ],
              [
                "if-match",
                ""
              ],
              [
                "if-modified-since",
                ""
              ],
              [
                "if-none-match",
                ""
              ],
              [
                "if-range",
                ""
              ],
              [
                "if-unmodified-since",
                ""
              ],
              [
                "last-modified",
                ""
              ],
              [
                "link",
                ""
              ],
              [
                "location",
                ""
              ],
              [
                "max-forwards",
                ""
              ],
              [
                "proxy-authenticate",
                ""
              ],
              [
                "proxy-authorization",
                ""
              ],
              [
                "range",
                ""
              ],
              [
                "referer",
                ""
              ],
              [
                "refresh",
                ""
              ],
              [
                "retry-after",
                ""
              ],
              [
                "server",
                ""
              ],
              [
                "set-cookie",
                ""
              ],
              [
                "strict-transport-security",
                ""
              ],
              [
                "transfer-encoding",
                ""
              ],
              [
                "user-agent",
                ""
              ],
              [
                "vary",
                ""
              ],
              [
                "via",
                ""
              ],
              [
                "www-authenticate",
                ""
              ]
            ],
            "_inProgress": false
          },
          "pipesCount": 1,
          "flowing": true,
          "ended": false,
          "endEmitted": false,
          "reading": false,
          "sync": false,
          "needReadable": true,
          "emittedReadable": false,
          "readableListening": false,
          "resumeScheduled": true,
          "defaultEncoding": "utf8",
          "ranOut": false,
          "awaitDrain": 0,
          "readingMore": false,
          "decoder": null,
          "encoding": null
        },
        "readable": true,
        "domain": null,
        "_events": {
          "end": [
            null,
            null
          ]
        },
        "_eventsCount": 4,
        "_writableState": {
          "objectMode": true,
          "highWaterMark": 16,
          "needDrain": false,
          "ending": false,
          "ended": false,
          "finished": false,
          "decodeStrings": true,
          "defaultEncoding": "utf8",
          "length": 0,
          "writing": false,
          "corked": 0,
          "sync": true,
          "bufferProcessing": false,
          "writecb": null,
          "writelen": 0,
          "bufferedRequest": null,
          "lastBufferedRequest": null,
          "pendingcb": 0,
          "prefinished": false,
          "errorEmitted": false,
          "bufferedRequestCount": 0,
          "corkedRequestsFree": {
            "next": null,
            "entry": null
          }
        },
        "writable": true,
        "allowHalfOpen": true,
        "_transformState": {
          "needTransform": false,
          "transforming": false,
          "writecb": null,
          "writechunk": null,
          "writeencoding": null
        },
        "_cursor": 0,
        "_buffer": {
          "type": "Buffer",
          "data": [
            212,
            0,
            0,
            0,
            99,
            0,
            0,
            0,
            1
          ]
        },
        "_waitingForHeader": true,
        "_frame": {}
      },
      "_compressor": "[Circular]",
      "_decompressor": "[Circular]",
      "_connection": "[Circular]"
    }
[2016-05-06T11:29:49.874Z]  INFO: myapp/http/6154 on opprtunity: New incoming HTTP/2 connection (client=::ffff:<IP_ADDRESS>:58955, SNI=false)
    e: {
      "_readableState": {
        "objectMode": false,
        "highWaterMark": 16384,
        "buffer": [],
        "length": 0,
        "pipes": null,
        "pipesCount": 0,
        "flowing": null,
        "ended": false,
        "endEmitted": false,
        "reading": false,
        "sync": true,
        "needReadable": false,
        "emittedReadable": false,
        "readableListening": false,
        "resumeScheduled": false,
        "defaultEncoding": "utf8",
        "ranOut": false,
        "awaitDrain": 0,
        "readingMore": false,
        "decoder": null,
        "encoding": null
      },
      "readable": true,
      "domain": null,
      "_events": {},
      "_eventsCount": 1,
      "_writableState": {
        "objectMode": false,
        "highWaterMark": 16384,
        "needDrain": false,
        "ending": false,
        "ended": false,
        "finished": false,
        "decodeStrings": true,
        "defaultEncoding": "utf8",
        "length": 0,
        "writing": false,
        "corked": 0,
        "sync": true,
        "bufferProcessing": false,
        "writecb": null,
        "writelen": 0,
        "bufferedRequest": null,
        "lastBufferedRequest": null,
        "pendingcb": 0,
        "prefinished": false,
        "errorEmitted": false,
        "bufferedRequestCount": 0,
        "corkedRequestsFree": {
          "next": null,
          "entry": null
        }
      },
      "writable": true,
      "allowHalfOpen": true,
      "_log": {
        "domain": null,
        "_events": {},
        "_eventsCount": 0,
        "_level": 30,
        "streams": [
          {
            "type": "stream",
            "stream": {
              "_connecting": false,
              "_hadError": false,
              "_handle": {
                "bytesRead": 0,
                "_externalStream": {},
                "fd": 1,
                "writeQueueSize": 0,
                "owner": "[Circular]"
              },
              "_parent": null,
              "_host": null,
              "_readableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "buffer": [],
                "length": 0,
                "pipes": null,
                "pipesCount": 0,
                "flowing": null,
                "ended": false,
                "endEmitted": false,
                "reading": false,
                "sync": true,
                "needReadable": false,
                "emittedReadable": false,
                "readableListening": false,
                "resumeScheduled": false,
                "defaultEncoding": "utf8",
                "ranOut": false,
                "awaitDrain": 0,
                "readingMore": false,
                "decoder": null,
                "encoding": null
              },
              "readable": false,
              "domain": null,
              "_events": {},
              "_eventsCount": 3,
              "_writableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "needDrain": false,
                "ending": false,
                "ended": false,
                "finished": false,
                "decodeStrings": false,
                "defaultEncoding": "utf8",
                "length": 0,
                "writing": false,
                "corked": 0,
                "sync": false,
                "bufferProcessing": false,
                "writecb": null,
                "writelen": 0,
                "bufferedRequest": null,
                "lastBufferedRequest": null,
                "pendingcb": 0,
                "prefinished": false,
                "errorEmitted": false,
                "bufferedRequestCount": 0,
                "corkedRequestsFree": {
                  "next": null,
                  "entry": null
                }
              },
              "writable": true,
              "allowHalfOpen": false,
              "destroyed": false,
              "_bytesDispatched": 12871,
              "_sockname": null,
              "_writev": null,
              "_pendingData": null,
              "_pendingEncoding": "",
              "server": null,
              "_server": null,
              "_type": "pipe",
              "fd": 1,
              "_isStdio": true
            },
            "closeOnExit": false,
            "level": 30,
            "raw": false
          }
        ],
        "serializers": null,
        "src": false,
        "fields": {
          "name": "myapp",
          "hostname": "opprtunity",
          "pid": 6154,
          "component": "endpoint",
          "e": "[Circular]"
        }
      },
      "_serializer": {
        "_log": {
          "domain": null,
          "_events": {},
          "_eventsCount": 0,
          "_level": 30,
          "streams": [
            {
              "type": "stream",
              "stream": "[Circular]",
              "closeOnExit": false,
              "level": 30,
              "raw": false
            }
          ],
          "serializers": null,
          "src": false,
          "fields": {
            "name": "myapp",
            "hostname": "opprtunity",
            "pid": 6154,
            "component": "serializer",
            "e": "[Circular]"
          }
        },
        "_readableState": {
          "objectMode": true,
          "highWaterMark": 16,
          "buffer": [],
          "length": 0,
          "pipes": null,
          "pipesCount": 0,
          "flowing": null,
          "ended": false,
          "endEmitted": false,
          "reading": false,
          "sync": false,
          "needReadable": true,
          "emittedReadable": false,
          "readableListening": false,
          "resumeScheduled": false,
          "defaultEncoding": "utf8",
          "ranOut": false,
          "awaitDrain": 0,
          "readingMore": false,
          "decoder": null,
          "encoding": null
        },
        "readable": true,
        "domain": null,
        "_events": {
          "error": [
            null,
            null
          ]
        },
        "_eventsCount": 7,
        "_writableState": {
          "objectMode": true,
          "highWaterMark": 16,
          "needDrain": false,
          "ending": false,
          "ended": false,
          "finished": false,
          "decodeStrings": true,
          "defaultEncoding": "utf8",
          "length": 0,
          "writing": false,
          "corked": 0,
          "sync": true,
          "bufferProcessing": false,
          "writecb": null,
          "writelen": 0,
          "bufferedRequest": null,
          "lastBufferedRequest": null,
          "pendingcb": 0,
          "prefinished": false,
          "errorEmitted": false,
          "bufferedRequestCount": 0,
          "corkedRequestsFree": {
            "next": null,
            "entry": null
          }
        },
        "writable": true,
        "allowHalfOpen": true,
        "_transformState": {
          "needTransform": false,
          "transforming": false,
          "writecb": null,
          "writechunk": null,
          "writeencoding": null
        }
      },
      "_deserializer": {
        "_log": {
          "domain": null,
          "_events": {},
          "_eventsCount": 0,
          "_level": 30,
          "streams": [
            {
              "type": "stream",
              "stream": "[Circular]",
              "closeOnExit": false,
              "level": 30,
              "raw": false
            }
          ],
          "serializers": null,
          "src": false,
          "fields": {
            "name": "myapp",
            "hostname": "opprtunity",
            "pid": 6154,
            "component": "deserializer",
            "e": "[Circular]"
          }
        },
        "_readableState": {
          "objectMode": true,
          "highWaterMark": 16,
          "buffer": [],
          "length": 0,
          "pipes": {
            "_readableState": {
              "objectMode": true,
              "highWaterMark": 16,
              "buffer": [],
              "length": 0,
              "pipes": {
                "_readableState": {
                  "objectMode": true,
                  "highWaterMark": 16,
                  "buffer": [
                    {
                      "type": "SETTINGS",
                      "flags": {
                        "ACK": false
                      },
                      "stream": 0,
                      "settings": {}
                    }
                  ],
                  "length": 1,
                  "pipes": {
                    "_readableState": {
                      "objectMode": true,
                      "highWaterMark": 16,
                      "buffer": [],
                      "length": 0,
                      "pipes": "[Circular]",
                      "pipesCount": 1,
                      "flowing": true,
                      "ended": false,
                      "endEmitted": false,
                      "reading": false,
                      "sync": false,
                      "needReadable": true,
                      "emittedReadable": false,
                      "readableListening": false,
                      "resumeScheduled": true,
                      "defaultEncoding": "utf8",
                      "ranOut": false,
                      "awaitDrain": 0,
                      "readingMore": false,
                      "decoder": null,
                      "encoding": null
                    },
                    "readable": true,
                    "domain": null,
                    "_events": {
                      "end": [
                        null,
                        null
                      ],
                      "error": [
                        null,
                        null
                      ]
                    },
                    "_eventsCount": 8,
                    "_writableState": {
                      "objectMode": true,
                      "highWaterMark": 16,
                      "needDrain": false,
                      "ending": false,
                      "ended": false,
                      "finished": false,
                      "decodeStrings": true,
                      "defaultEncoding": "utf8",
                      "length": 0,
                      "writing": false,
                      "corked": 0,
                      "sync": true,
                      "bufferProcessing": false,
                      "writecb": null,
                      "writelen": 0,
                      "bufferedRequest": null,
                      "lastBufferedRequest": null,
                      "pendingcb": 0,
                      "prefinished": false,
                      "errorEmitted": false,
                      "bufferedRequestCount": 0,
                      "corkedRequestsFree": {
                        "next": null,
                        "entry": null
                      }
                    },
                    "writable": true,
                    "allowHalfOpen": true,
                    "_transformState": {
                      "needTransform": false,
                      "transforming": false,
                      "writecb": null,
                      "writechunk": null,
                      "writeencoding": null
                    },
                    "_log": {
                      "domain": null,
                      "_events": {},
                      "_eventsCount": 0,
                      "_level": 30,
                      "streams": [
                        {
                          "type": "stream",
                          "stream": "[Circular]",
                          "closeOnExit": false,
                          "level": 30,
                          "raw": false
                        }
                      ],
                      "serializers": null,
                      "src": false,
                      "fields": {
                        "name": "myapp",
                        "hostname": "opprtunity",
                        "pid": 6154,
                        "component": "compressor",
                        "e": "[Circular]"
                      }
                    },
                    "_table": [
                      [
                        ":authority",
                        ""
                      ],
                      [
                        ":method",
                        "GET"
                      ],
                      [
                        ":method",
                        "POST"
                      ],
                      [
                        ":path",
                        "/"
                      ],
                      [
                        ":path",
                        "/index.html"
                      ],
                      [
                        ":scheme",
                        "http"
                      ],
                      [
                        ":scheme",
                        "https"
                      ],
                      [
                        ":status",
                        "200"
                      ],
                      [
                        ":status",
                        "204"
                      ],
                      [
                        ":status",
                        "206"
                      ],
                      [
                        ":status",
                        "304"
                      ],
                      [
                        ":status",
                        "400"
                      ],
                      [
                        ":status",
                        "404"
                      ],
                      [
                        ":status",
                        "500"
                      ],
                      [
                        "accept-charset",
                        ""
                      ],
                      [
                        "accept-encoding",
                        "gzip, deflate"
                      ],
                      [
                        "accept-language",
                        ""
                      ],
                      [
                        "accept-ranges",
                        ""
                      ],
                      [
                        "accept",
                        ""
                      ],
                      [
                        "access-control-allow-origin",
                        ""
                      ],
                      [
                        "age",
                        ""
                      ],
                      [
                        "allow",
                        ""
                      ],
                      [
                        "authorization",
                        ""
                      ],
                      [
                        "cache-control",
                        ""
                      ],
                      [
                        "content-disposition",
                        ""
                      ],
                      [
                        "content-encoding",
                        ""
                      ],
                      [
                        "content-language",
                        ""
                      ],
                      [
                        "content-length",
                        ""
                      ],
                      [
                        "content-location",
                        ""
                      ],
                      [
                        "content-range",
                        ""
                      ],
                      [
                        "content-type",
                        ""
                      ],
                      [
                        "cookie",
                        ""
                      ],
                      [
                        "date",
                        ""
                      ],
                      [
                        "etag",
                        ""
                      ],
                      [
                        "expect",
                        ""
                      ],
                      [
                        "expires",
                        ""
                      ],
                      [
                        "from",
                        ""
                      ],
                      [
                        "host",
                        ""
                      ],
                      [
                        "if-match",
                        ""
                      ],
                      [
                        "if-modified-since",
                        ""
                      ],
                      [
                        "if-none-match",
                        ""
                      ],
                      [
                        "if-range",
                        ""
                      ],
                      [
                        "if-unmodified-since",
                        ""
                      ],
                      [
                        "last-modified",
                        ""
                      ],
                      [
                        "link",
                        ""
                      ],
                      [
                        "location",
                        ""
                      ],
                      [
                        "max-forwards",
                        ""
                      ],
                      [
                        "proxy-authenticate",
                        ""
                      ],
                      [
                        "proxy-authorization",
                        ""
                      ],
                      [
                        "range",
                        ""
                      ],
                      [
                        "referer",
                        ""
                      ],
                      [
                        "refresh",
                        ""
                      ],
                      [
                        "retry-after",
                        ""
                      ],
                      [
                        "server",
                        ""
                      ],
                      [
                        "set-cookie",
                        ""
                      ],
                      [
                        "strict-transport-security",
                        ""
                      ],
                      [
                        "transfer-encoding",
                        ""
                      ],
                      [
                        "user-agent",
                        ""
                      ],
                      [
                        "vary",
                        ""
                      ],
                      [
                        "via",
                        ""
                      ],
                      [
                        "www-authenticate",
                        ""
                      ]
                    ]
                  },
                  "pipesCount": 1,
                  "flowing": true,
                  "ended": false,
                  "endEmitted": false,
                  "reading": false,
                  "sync": true,
                  "needReadable": false,
                  "emittedReadable": false,
                  "readableListening": false,
                  "resumeScheduled": true,
                  "defaultEncoding": "utf8",
                  "ranOut": false,
                  "awaitDrain": 0,
                  "readingMore": true,
                  "decoder": null,
                  "encoding": null
                },
                "readable": true,
                "domain": null,
                "_events": {
                  "end": [
                    null,
                    null
                  ],
                  "error": [
                    null,
                    null
                  ]
                },
                "_eventsCount": 19,
                "_writableState": {
                  "objectMode": true,
                  "highWaterMark": 16,
                  "needDrain": false,
                  "ending": false,
                  "ended": false,
                  "finished": false,
                  "decodeStrings": true,
                  "defaultEncoding": "utf8",
                  "length": 0,
                  "writing": false,
                  "corked": 0,
                  "sync": true,
                  "bufferProcessing": false,
                  "writecb": null,
                  "writelen": 0,
                  "bufferedRequest": null,
                  "lastBufferedRequest": null,
                  "pendingcb": 0,
                  "prefinished": false,
                  "errorEmitted": false,
                  "bufferedRequestCount": 0,
                  "corkedRequestsFree": {
                    "next": null,
                    "entry": null
                  }
                },
                "writable": true,
                "allowHalfOpen": true,
                "_initialWindow": 65535,
                "_window": 65535,
                "_flowControlId": 0,
                "_queue": [],
                "_ended": false,
                "_received": 0,
                "_blocked": false,
                "_log": {
                  "domain": null,
                  "_events": {},
                  "_eventsCount": 0,
                  "_level": 30,
                  "streams": [
                    {
                      "type": "stream",
                      "stream": "[Circular]",
                      "closeOnExit": false,
                      "level": 30,
                      "raw": false
                    }
                  ],
                  "serializers": null,
                  "src": false,
                  "fields": {
                    "name": "myapp",
                    "hostname": "opprtunity",
                    "pid": 6154,
                    "component": "connection",
                    "e": "[Circular]"
                  }
                },
                "_streamIds": [
                  {
                    "upstream": {}
                  }
                ],
                "_streamPriorities": [],
                "_nextStreamId": 2,
                "_lastIncomingStream": 0,
                "_streamSlotsFree": null,
                "_streamLimit": null,
                "_pings": {},
                "_closed": false,
                "_initialStreamWindowSize": 65535,
                "_settingsAckCallbacks": [
                  null
                ],
                "_sendScheduled": false,
                "_firstFrameReceived": false
              },
              "pipesCount": 1,
              "flowing": true,
              "ended": false,
              "endEmitted": false,
              "reading": false,
              "sync": false,
              "needReadable": true,
              "emittedReadable": false,
              "readableListening": false,
              "resumeScheduled": true,
              "defaultEncoding": "utf8",
              "ranOut": false,
              "awaitDrain": 0,
              "readingMore": false,
              "decoder": null,
              "encoding": null
            },
            "readable": true,
            "domain": null,
            "_events": {
              "end": [
                null,
                null
              ],
              "error": [
                null,
                null
              ]
            },
            "_eventsCount": 8,
            "_writableState": {
              "objectMode": true,
              "highWaterMark": 16,
              "needDrain": false,
              "ending": false,
              "ended": false,
              "finished": false,
              "decodeStrings": true,
              "defaultEncoding": "utf8",
              "length": 0,
              "writing": false,
              "corked": 0,
              "sync": true,
              "bufferProcessing": false,
              "writecb": null,
              "writelen": 0,
              "bufferedRequest": null,
              "lastBufferedRequest": null,
              "pendingcb": 0,
              "prefinished": false,
              "errorEmitted": false,
              "bufferedRequestCount": 0,
              "corkedRequestsFree": {
                "next": null,
                "entry": null
              }
            },
            "writable": true,
            "allowHalfOpen": true,
            "_transformState": {
              "needTransform": false,
              "transforming": false,
              "writecb": null,
              "writechunk": null,
              "writeencoding": null
            },
            "_log": {
              "domain": null,
              "_events": {},
              "_eventsCount": 0,
              "_level": 30,
              "streams": [
                {
                  "type": "stream",
                  "stream": "[Circular]",
                  "closeOnExit": false,
                  "level": 30,
                  "raw": false
                }
              ],
              "serializers": null,
              "src": false,
              "fields": {
                "name": "myapp",
                "hostname": "opprtunity",
                "pid": 6154,
                "component": "compressor",
                "e": "[Circular]"
              }
            },
            "_table": [
              [
                ":authority",
                ""
              ],
              [
                ":method",
                "GET"
              ],
              [
                ":method",
                "POST"
              ],
              [
                ":path",
                "/"
              ],
              [
                ":path",
                "/index.html"
              ],
              [
                ":scheme",
                "http"
              ],
              [
                ":scheme",
                "https"
              ],
              [
                ":status",
                "200"
              ],
              [
                ":status",
                "204"
              ],
              [
                ":status",
                "206"
              ],
              [
                ":status",
                "304"
              ],
              [
                ":status",
                "400"
              ],
              [
                ":status",
                "404"
              ],
              [
                ":status",
                "500"
              ],
              [
                "accept-charset",
                ""
              ],
              [
                "accept-encoding",
                "gzip, deflate"
              ],
              [
                "accept-language",
                ""
              ],
              [
                "accept-ranges",
                ""
              ],
              [
                "accept",
                ""
              ],
              [
                "access-control-allow-origin",
                ""
              ],
              [
                "age",
                ""
              ],
              [
                "allow",
                ""
              ],
              [
                "authorization",
                ""
              ],
              [
                "cache-control",
                ""
              ],
              [
                "content-disposition",
                ""
              ],
              [
                "content-encoding",
                ""
              ],
              [
                "content-language",
                ""
              ],
              [
                "content-length",
                ""
              ],
              [
                "content-location",
                ""
              ],
              [
                "content-range",
                ""
              ],
              [
                "content-type",
                ""
              ],
              [
                "cookie",
                ""
              ],
              [
                "date",
                ""
              ],
              [
                "etag",
                ""
              ],
              [
                "expect",
                ""
              ],
              [
                "expires",
                ""
              ],
              [
                "from",
                ""
              ],
              [
                "host",
                ""
              ],
              [
                "if-match",
                ""
              ],
              [
                "if-modified-since",
                ""
              ],
              [
                "if-none-match",
                ""
              ],
              [
                "if-range",
                ""
              ],
              [
                "if-unmodified-since",
                ""
              ],
              [
                "last-modified",
                ""
              ],
              [
                "link",
                ""
              ],
              [
                "location",
                ""
              ],
              [
                "max-forwards",
                ""
              ],
              [
                "proxy-authenticate",
                ""
              ],
              [
                "proxy-authorization",
                ""
              ],
              [
                "range",
                ""
              ],
              [
                "referer",
                ""
              ],
              [
                "refresh",
                ""
              ],
              [
                "retry-after",
                ""
              ],
              [
                "server",
                ""
              ],
              [
                "set-cookie",
                ""
              ],
              [
                "strict-transport-security",
                ""
              ],
              [
                "transfer-encoding",
                ""
              ],
              [
                "user-agent",
                ""
              ],
              [
                "vary",
                ""
              ],
              [
                "via",
                ""
              ],
              [
                "www-authenticate",
                ""
              ]
            ],
            "_inProgress": false
          },
          "pipesCount": 1,
          "flowing": true,
          "ended": false,
          "endEmitted": false,
          "reading": false,
          "sync": false,
          "needReadable": true,
          "emittedReadable": false,
          "readableListening": false,
          "resumeScheduled": true,
          "defaultEncoding": "utf8",
          "ranOut": false,
          "awaitDrain": 0,
          "readingMore": false,
          "decoder": null,
          "encoding": null
        },
        "readable": true,
        "domain": null,
        "_events": {
          "end": [
            null,
            null
          ]
        },
        "_eventsCount": 4,
        "_writableState": {
          "objectMode": true,
          "highWaterMark": 16,
          "needDrain": false,
          "ending": false,
          "ended": false,
          "finished": false,
          "decodeStrings": true,
          "defaultEncoding": "utf8",
          "length": 0,
          "writing": false,
          "corked": 0,
          "sync": true,
          "bufferProcessing": false,
          "writecb": null,
          "writelen": 0,
          "bufferedRequest": null,
          "lastBufferedRequest": null,
          "pendingcb": 0,
          "prefinished": false,
          "errorEmitted": false,
          "bufferedRequestCount": 0,
          "corkedRequestsFree": {
            "next": null,
            "entry": null
          }
        },
        "writable": true,
        "allowHalfOpen": true,
        "_transformState": {
          "needTransform": false,
          "transforming": false,
          "writecb": null,
          "writechunk": null,
          "writeencoding": null
        },
        "_cursor": 0,
        "_buffer": {
          "type": "Buffer",
          "data": [
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ]
        },
        "_waitingForHeader": true,
        "_frame": {}
      },
      "_compressor": "[Circular]",
      "_decompressor": "[Circular]",
      "_connection": "[Circular]"
    }
FATAL ERROR: invalid array length Allocation failed - process out of memory

<--- Last few GCs --->

   62389 ms: Scavenge 1395.8 (1442.0) -> 1395.8 (1442.0) MB, 0.2 / 0 ms (+ 5.8 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
   62706 ms: Mark-sweep 1395.8 (1442.0) -> 978.9 (1019.0) MB, 317.6 / 0 ms (+ 19.9 ms in 6 steps since start of marking, biggest step 10.0 ms) [last resort gc].
   63011 ms: Mark-sweep 978.9 (1019.0) -> 978.9 (1018.0) MB, 304.4 / 0 ms [last resort gc].

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x549116e3ac1 <JS Object>
    1: SerializeArray(aka SerializeArray) [native json.js:~51] [pc=0x2790b5d30e38] (this=0x54911604189 <undefined>,u=0x549116fd381 <JS Array[1073741825]>,v=0x549116fd339 <JS Function replacer (SharedFunctionInfo 0x39da50872671)>,w=0x549116fd319 <JS Array[8]>,x=0x549116042e1 <String[0]: >,y=0x549116042e1 <String[0]: >)
    2: JSONSerialize(aka JSONSerialize) [native json.js:~123] [pc=0x2790b5aaa8...

[1]    6154 abort      node ./bin/src/index-babel.js |
       6155 done       bunyan
➜  showtime-app git:(master) ✗

whats up with babel.js in there?

@MrOutput No relevance. Add syntax support for object destructuring.

@gajus could you put that big log code block into a gist at all? It is making the page very large.

@gajus please hide you code
For now (while we are waiting for Express v5) you can use spdy with express
const port = 3000
const spdy = require('spdy')
const express = require('express')
const path = require('path')
const fs = require('fs')

const app = express()

app.get('*', (req, res) => {
    res.json({foo: 'test'})
})
let options = {
    key: fs.readFileSync(__dirname + '/server.key'),
    cert:  fs.readFileSync(__dirname + '/server.crt')
};
console.log(options);
spdy
  .createServer(options, app)
  .listen(port, (err) => {
      if (err) {
          process.exit(1)
      }
      console.log('Listening on port: ' + port + '.')
  })

@azat-co SPDY is dead

@konradjurk what exactly do you mean by dead? spdy is repo is alive. even if there's not much active development, you can use it right now

@azat-co Google Chrome doesn't support SPDY anymore: http://blog.chromium.org/2016/02/transitioning-from-spdy-to-http2.html
So when even its inventor won't support it you know it is dead

@konradjurk Google SPDY become HTTP/2, if my understanding correct. That's the standards. Now the libraries: spdy library works just fine as it is. It's not dead. The repo is not down. The repo does NOT say it is deprecated. http2 lib for node is not supporting Express so spdy is a good option. The official H2 doc&specs list spdy  as one of the implementations.

@konradjurk so basically spdy become http/2 standard and whatever spdy lib had is a viable choice for H2 features... spdy lib is not dead in any case AFAIK 😄

OK, this is getting out of hand... too much discussion not related to fixing this bug spamming my inbox. I'll be locking this conversation.
However, just to note, spdy is dead. Chrome no longer supports it. I disabled support for it in Firefox 50 (scheduled to release in 12 weeks or so), and removed it entirely in Firefox 51 (6 weeks or so after 50). It is not compatible with h2, even if it was the basis for the spec work, so no, spdy is not a good option for anyone.
If I ever get more than a few hours to work on this repo, I might actually try to make this work with Express since it's obviously a pain point for a lot of people, but I don't see any time soon when that would happen. Until that, patches are more than welcome to fix the issue.


Incompatible with new PyYAML package

This does not compile with PyYAML version 3.13 (available in Arch Linux).

Thanks for reporting this issue. Should be fixed now.


Ft email verification link 158121598

What does this PR do?

This Pull request provides the feature for a User to be able to receive a verification link via email upon successful signup

Description of Task to be completed?

Create a controller to handle signup and send email link for verification using an npm package called sendgrid, when signup is successful.

How should this be manually tested?

When a user signs up, the user gets a verification email in the email he/she signs up with

Any background context you want to provide?

N/A

What are the relevant pivotal tracker stories?

https://www.pivotaltracker.com/story/show/158121598

Screenshots (if appropriate)

N/A

Questions:

Pull Request Test Coverage Report for Build 83

4 of 40 (10.0%)  changed or added relevant lines in 2 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-2.0%) to 50.545%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

app/controllers/users.js
3
39
7.69%

Files with Coverage Reduction
New Missed Lines
%

app/controllers/users.js
2
10.62%

Totals

Change from base Build 63:
-2.0%

Covered Lines:
518

Relevant Lines:
862

💛  - Coveralls


[MM-44651] Implement MaxCallParticipants config setting

Summary
PR makes the necessary changes to support the new MaxCallParticipants config setting.
@cpoile Again I tried to simplify as much as possible but will need some help testing this to make sure I haven't missed some edge case.
Ticket Link
https://mattermost.atlassian.net/browse/MM-44651
Checklist

[x] Added or updated unit tests (required for all new features)

Related PRs
https://github.com/mattermost/mattermost-plugin-calls/pull/93
Release Note
Added support for the new MaxCallParticipants config setting

@amyblais This is the last PR we are planning to include in 1.53

From what I could see, given the issues with testing https://github.com/mattermost/mattermost-plugin-calls/pull/93 , this should work as expected. Let's ship it.

Cherry pick is scheduled.


coverity 1374999: Resource leak

Do you need to add some null checks elsewhere in the code if argc == 1 and you don't attach a config object to the continuation?

@shinrich It looks like the plugin doesn't start up without a configuration... Maybe we should have an error message in that case though, but that is how it behaved before too (it'd just leak the memory).


update the file name for client_secret

The documentation says the file should be called client_secret, not client_secrets ( https://developers.google.com/calendar/quickstart/ruby )

I'm actually in the process of changing that file name across all of our sample repos, and just created PR #6 to do so in this repo. Closing this PR since it's now obsolete, but thanks for the help.


Element ref was specified as a string (container-tc)

App breaking because of react-notification-system
Piece of code from a functional component:
export default const Notification = () => {
return (
      <NotificationSystem
        ref={ref => {
          window.__notification = ref
        }}
      />
    )
}

Some Utility code where actually adding notification
export const notify = (err, message, level) => {
window.__notification.addNotification({
    position: 'tc',
    message,
    level,
    autoDismiss: 5,
    dismissible: 'button'
  })
}

Error:
Uncaught Invariant Violation: Element ref was specified as a string (container-tc) but no owner was set. This could happen for one of the following reasons:

You may be adding a ref to a function component
You may be adding a ref to a component that was not created inside a component's render method
You have multiple copies of React loaded

Configuration:
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-notification-system": "^0.2.17",

I just tested the latest version with the latest version of React as well, and I didn't get any errors. Can you set up a project so I can reproduce this?

Looks like the issue is fixed. Hence closing

Not totally fixed! Using React 17 the warning still arrises annoyingly if <Notifications /> component is wrapped within <React.StrictMode> .
Here's the warning I'm getting:

Warning: A string ref, "container-tr", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here

The issue seems to lie in the following line on NotificationSystem.jsx file https://github.com/igorprado/react-notification-system/blob/4954ae9ca3e76367cde619b6e3ca78fad046680c/src/NotificationSystem.jsx#L260
Configuration:
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-notification-system": "^0.4.0",


Unable to reference types inside generated API client using module's namespace #template

If using Cocoapods (not sure if true for other DMs), public struct {{ options.name }} will be matching your generated API client Swift module name which breaks types lookup. For example, if your codebase or another module has a type User and your generated API client has User, then referencing User from generated API client via  {{ options.name }}.User won't work.
Apparently is a limitation of Swift compiler - https://bugs.swift.org/browse/SR-1386
Suggest moving away from public struct {{ options.name }} by to splitting it up into public struct Config that holds coding options and Server and public struct Operation to namespace operations.
What do you think @yonaskolb ?

@yonaskolb have you had a chance to review this suggestion? Do you see a way to work around this problem without making braking changes?

I'm happy to


[BUG] case sensitive LNURLxyz in payment request field

Open Wallet
press Payment Request button
Put in LNURLl1dp68gurn8ghj7mrw9e6xjurn9uh8wetvdskkkmn0wahz7mrww4excup0v9exyctyv93kzunzvy56s3ps will not work
Put in lnurl1dp68gurn8ghj7mrw9e6xjurn9uh8wetvdskkkmn0wahz7mrww4excup0v9exyctyv93kzunzvy56s3ps will work

#1713 closed this issue


This is a new test issue

And this is the description

I am very sure.

Great!

I love it!

So, what do you think?

I don't know

test

another test

one more time

hello

one more test

new test

one more better test

let's try again

YES!

This sucks!

This is very bad I don't like it

I really love this!

This sucks!

But I really love it!

How can that happen?!


global: flask-oauthlib prevents reading the request stream

For every API request we call verify_oauth_token_and_set_current_user. This method calls Flask-Oauthlib which makes a call to request.form.to_dict()
Accessing request.form makes Werkzeug parse the request body, and thereby preventing e.g. Invenio-Files-REST to read the request body via request.stream, which is needed for fast file uploads.

@lnielsen I don't see a way around it unless mock the request.stream or perform the authentication after copying the file. Can you point us to the code in Invenio-Files-REST that relies on request.stream?

Here
It's crucial to be able to read from request.stream in Files-REST in order to have high performance. Uploading files via application/multipart-formdata (i.e. reading stuff from request.form and request.files) kills performance because it writes data to disk in temporary files (Werkzeug for files >500kb) and spends time parsing the form data.
I will try to see if I can mock the request.stream or request.form to prevent Flask-Oauthlib from reading the request.body.

Actually, digging a bit deeper into it, I think the problem is different.
Werkzeug's form data parser kicks-in if the Content-Type header is set. The form parser first checks if Content-Length exceeds maximum allowed length, then try to find a suitable parser function for a given MIME type. All this is executed when Flask-OAuthlib calls request.form.to_dict().
We have set MAX_CONTENT_LENGTH in Files-REST to ~15mb, since anything above 500kb will be written to a temporary file, this possible exhausting the local disk (i.e. it makes sense to put a limit). However, in Files-REST we also want to allow very large file uploads in a single request via streaming the file in the body (and reading it from request.stream without writing it to temporary file on disk).
If Werkzeug's form parser reversed the order to 1) find suitable parser for MIME type, then 2) check content length, then calls to request.form (like the one from Flask-OAuthlib) wouldn't be an issue, because Werkzeug wouldn't even try to read the data. I.e. change this, into something like this:
def parse(self, stream, mimetype, content_length, options=None):
    if options is None:
        options = {}

    parse_func = self.get_parse_func(mimetype, options)
    if parse_func is not None:
        if self.max_content_length is not None and \
           content_length is not None and \
           content_length > self.max_content_length:
            raise exceptions.RequestEntityTooLarge()

        try:
            return parse_func(self, stream, mimetype,
                              content_length, options)
        except ValueError:
            if not self.silent:
                raise

    return stream, self.cls(), self.cls()

I think these two PRs are the cleanest way of fixing the issue:

inveniosoftware/invenio-base#94 (allow custom Flask application class)
inveniosoftware/invenio-files-rest#108 (custom Flask application class with a fixed form parser)

This can easily be used only on the API application like this:
from invenio_files_rest.app import Flask

create_api = create_app_factory(
    'myapp',
    ....
    app_class=Flask,
)


Enhance "npm run commit"

npm run commit script include the git add . , which  add all modified files.
If you made several changes and run npm  run commit all files  will be add to stage,  we need to extract the git add . from the command to allow the capability to commit single.

done


Fix building on x86 32-bit Linux

Fixes https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/1841
rbx and rsi are 64-bit registers, in 32-bt you need to use ebx and esi
This 32-bit platform  probably isn't getting much testing these days, I'm getting a lot of test failures on my VM.
[  23/1066] [MixingSlider / basic                                        ] - FAILED
[ 155/1066] [CPUProcessor / optimizations                                ] - FAILED
[ 162/1066] [DynamicPropertyImpl / grading_rgb_curve_knots               ] - FAILED
[ 175/1066] [FileFormat3DL / load                                        ] - FAILED
[ 196/1066] [FileFormatCTF / clf_examples                                ] - FAILED
[ 219/1066] [FileFormatCTF / tabluation_support                          ] - FAILED
[ 264/1066] [FileFormatCTF / indexMap_test1_clfv2                        ] - FAILED
[ 419/1066] [FileFormatCTF / bake_1d_3d                                  ] - FAILED
[ 422/1066] [FileFormatD1DL / test_lut1d_8i_8i                           ] - FAILED
[ 425/1066] [FileFormatD1DL / test_lut1d_16f_12i                         ] - FAILED
[ 429/1066] [FileFormatHDL / bake_1d_shaper                              ] - FAILED
[ 464/1066] [FileFormatResolveCube / bake_1d_shaper                      ] - FAILED
[ 473/1066] [FileFormatSpi1D / bake_1d_shaper                            ] - FAILED
[ 534/1066] [GpuShader / MetalSupport8                                   ] - FAILED
[ 626/1066] [ExposureContrastRenderer / video                            ] - FAILED
[ 627/1066] [ExposureContrastRenderer / log                              ] - FAILED
[ 669/1066] [GammaOp / combining                                         ] - FAILED
[ 794/1066] [Lut1DRenderer / lut_1d_inv_decreasing_reversals             ] - FAILED
[ 961/1066] [SSE2 / packed_all_test                                      ] - FAILED
[ 968/1066] [AVX / packed_all_test                                       ] - FAILED
[ 975/1066] [AVX2 / packed_all_test                                      ] - FAILED

A lot of them look like rounding errors similar to the ones we get one arm64

Ya, they are probably more then just rounding errors.  Some the values just off by 1. I tested 32bit on windows with msvc too and only get 1 Failed case.
FAILED: int(100000) == int((slider.mixingToSlider(slider.getSliderMaxEdge()))*100000.)
        values were '100000' and '99999'
[  23/1066] [MixingSlider / basic                                        ] - FAILED

This could be compiler related too.


Rethink about the role of formats.yaml

We don't seem to use the content of formats.yaml anywhere in the code. We should think again what role it should play.

What was the original purpose of the file: to provide extra info to the user or was there a functional aspect to it? If the former, we similarly have fields in the datasets.yaml that aren't really used such as subdatasets.description. Should we maybe include this info in the human output of get_dataset_metadata?

Maybe we should have a detailed version of the description. We can also consider rename the human-readable function to describe_dataset(detailed=False) and leave get_dataset_metadata as a helper function for programming purposes. If detailed=True, we also print subdatasets info.
There can be other functional aspects considering https://github.com/CODAIT/pydax/issues/45#issuecomment-742163227

One question is whether we should put some advisory info on format options into this file.

Can you give an example of what you mean by advisory info?

For example, csv format accepts options like columns, encodings, delimiters. But these are advisory, because a user can always customize a loader to accept or neglect some options.


Update zio to 1.0.5

Updates dev.zio:zio from 1.0.4-2 to 1.0.5.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "dev.zio", artifactId = "zio" } ]

labels: library-update, semver-pre-release

Superseded by #553.


Update anomaly-detector-client-library-csharp-multivariate.md

Please help review and approve this PR, thanks!

#sign-off

#sign-off


Photoshop CC 2019 crashes on script run

Unfortunately I do not have much information to give, I am fairly new to Photoshop.

Edit: Crash report contents in a gist as I could not format code inside a collapsible block.
https://gist.github.com/XenHat/2358710fe6887f417d5cacc164b13991

This looks like an issue with your photoshop.
I would google around on:
photoshop exception 0xc0000005
or photoshop EXCEPTION_ACCESS_VIOLATION
This is likely a preferences, config, or hardware issue.

on a fresh install?

@XenHat Again, this likely is not an issue with the script (otherwise it would be more prevalent) but likely with your machine/photoshop/config/file.  I cannot offer help debugging this since it is not a code error.

I've reset my photoshop configuration, issue still persists 😕


Fix OpenstackEventMonitor specs

OpenstackEventMonitor now uses miq-module's cache_with_timeout method.  In the specs for miq-module, the cache used by cache_with_timeout was getting forcefully cleared after each miq-module test run.
Since no other gems in gems/pending were previously using cache_with_timeout, this has never caused problems before.  But, now that OpenstackEventMonitor is depending on the cache, the miq-module spec needs to be updated to use the clear_all_cache_with_timeout method to safely clear the cache, while leaving entries created by loading other classes available.

:+1: Merge when green.


will you support quantize the embedding layer and lm_head layer?

As current quantization can only support quantize attention and ffn layers in transformer block, can you support quantize the embedding layer and the last layer named lm_head?

+1

Hi,
We currently do not have plan to support embedding layer and lm_head layer.