What might the fallback when HTTP1 Upgrade fails ?

On Mon, Oct 28, 2013 at 7:53 PM, Gábor Molnár <notifications@github.com>wrote:

> In lib/http.js:
>
> >
> >    var start = this._start.bind(this);
> >    var fallback = this._fallback.bind(this);
> > +  // HTTP/2 with HTTP/1.1 upgrade
> > +  //
> > +  if (options.upgrade) {
> > +	this._log.debug({ upgrade: options.upgrade}, 'Server starting HTTP2 upgrade.');
> > +	this._server = http.createServer();
> > +	// this._start.bind(this);
> > +	self=this;
> > +
> > +	this._server.on('upgrade', function(request, socket, header) {
> > +	  self._log.debug({ upgrade: options.upgrade}, 'HTTP/2 server receiving client HTTP1.1 Connection Upgrade.');
> > +	
> > +	   if (request.headers['http2-settings'] && request.headers.upgrade && request.headers.connection ) {
>
> If this is not true, then we should operate in fallback mode, just like
> when an ALPN negotiation is not successful.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/molnarg/node-http2/pull/55/files#r7259060>
> .
>