Comparing version 16.1.0 to 16.1.1
@@ -50,3 +50,10 @@ 'use strict'; | ||
return Accept.encoding(request.headers['accept-encoding'], this.encodings); | ||
const header = request.headers['accept-encoding']; | ||
const accept = Accept.encoding(header, this.encodings); | ||
if (accept instanceof Error) { | ||
request.log(['accept-encoding', 'error'], { header, error: accept }); | ||
return 'identity'; | ||
} | ||
return accept; | ||
}; | ||
@@ -53,0 +60,0 @@ |
@@ -28,6 +28,3 @@ 'use strict'; | ||
this.domain = Domain.create(); | ||
this.domain.on('error', (err) => { | ||
return this._onError(err); | ||
}); | ||
this.domain.on('error', this._onError.bind(this)); | ||
}; | ||
@@ -34,0 +31,0 @@ |
@@ -110,14 +110,2 @@ 'use strict'; | ||
this.info = { | ||
received: now, | ||
responded: 0, | ||
remoteAddress: req.connection.remoteAddress, | ||
remotePort: req.connection.remotePort || '', | ||
referrer: req.headers.referrer || req.headers.referer || '', | ||
host: req.headers.host ? req.headers.host.replace(/\s/g, '') : '', | ||
acceptEncoding: this.connection._compression.accept(this) | ||
}; | ||
this.info.hostname = this.info.host.split(':')[0]; | ||
// Assigned elsewhere: | ||
@@ -157,2 +145,16 @@ | ||
// Request info | ||
this.info = { | ||
received: now, | ||
responded: 0, | ||
remoteAddress: req.connection.remoteAddress, | ||
remotePort: req.connection.remotePort || '', | ||
referrer: req.headers.referrer || req.headers.referer || '', | ||
host: req.headers.host ? req.headers.host.replace(/\s/g, '') : '', | ||
acceptEncoding: this.connection._compression.accept(this) | ||
}; | ||
this.info.hostname = this.info.host.split(':')[0]; | ||
// Listen to request state | ||
@@ -159,0 +161,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"homepage": "http://hapijs.com", | ||
"version": "16.1.0", | ||
"version": "16.1.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -23,2 +23,6 @@ <img src="https://raw.github.com/hapijs/hapi/master/images/hapi.png" /> | ||
#### Current Supporters | ||
- **CNN Digital** | ||
#### Legacy Supporters | ||
@@ -25,0 +29,0 @@ |
Sorry, the diff of this file is not supported yet
182389
4484
31