Comparing version 16.2.0 to 16.3.0
@@ -97,2 +97,3 @@ 'use strict'; | ||
this.server._log(['connection', 'client', 'error'], err); | ||
socket.destroy(err); | ||
}); | ||
@@ -99,0 +100,0 @@ |
@@ -375,3 +375,5 @@ 'use strict'; | ||
if (type === 'request') { | ||
return this.root._requestor.decorate(property, method, options); | ||
this.root._requestor.decorate(property, method, options); | ||
this.root.decorations.request.push(property); | ||
return; | ||
} | ||
@@ -384,3 +386,5 @@ | ||
if (type === 'reply') { | ||
return this.root._replier.decorate(property, method); | ||
this.root._replier.decorate(property, method); | ||
this.root.decorations.reply.push(property); | ||
return; | ||
} | ||
@@ -394,2 +398,3 @@ | ||
this.root._decorations[property] = method; | ||
this.root.decorations.server.push(property); | ||
@@ -404,3 +409,2 @@ this[property] = method; | ||
internals.Plugin.prototype.dependency = function (dependencies, after) { | ||
@@ -407,0 +411,0 @@ |
@@ -201,15 +201,33 @@ 'use strict'; | ||
this.url = (typeof url === 'string' ? Url.parse(url, true) : url); | ||
this.query = this.url.query; | ||
this.path = this.url.pathname || ''; // pathname excludes query | ||
url = (typeof url === 'string' ? Url.parse(url, true) : Hoek.clone(url)); | ||
// Apply path modifications | ||
let path = this.connection._router.normalize(url.pathname || ''); // pathname excludes query | ||
if (stripTrailingSlash && | ||
this.path.length > 1 && | ||
this.path[this.path.length - 1] === '/') { | ||
path.length > 1 && | ||
path[path.length - 1] === '/') { | ||
this.path = this.path.slice(0, -1); | ||
this.url.pathname = this.path; | ||
path = path.slice(0, -1); | ||
} | ||
this.path = this.connection._router.normalize(this.path); | ||
// Update derived url properties | ||
if (path !== url.pathname) { | ||
url.pathname = path; | ||
url.path = url.search ? path + url.search : path; | ||
url.href = Url.format(url); | ||
} | ||
// Store request properties | ||
this.url = url; | ||
this.query = url.query; | ||
this.path = url.pathname; | ||
if (url.hostname) { | ||
this.info.hostname = url.hostname; | ||
this.info.host = url.host; | ||
} | ||
}; | ||
@@ -216,0 +234,0 @@ |
@@ -51,2 +51,3 @@ 'use strict'; | ||
this._decorations = {}; | ||
this.decorations = { request: [], reply: [], server: [] }; | ||
this._plugins = {}; // Exposed plugin properties by name | ||
@@ -53,0 +54,0 @@ this._app = {}; |
@@ -5,3 +5,3 @@ { | ||
"homepage": "http://hapijs.com", | ||
"version": "16.2.0", | ||
"version": "16.3.0", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -11,3 +11,3 @@ <img src="https://raw.github.com/hapijs/hapi/master/images/hapi.png" /> | ||
Development version: **16.2.x** ([release notes](https://github.com/hapijs/hapi/issues?labels=release+notes&page=1&state=closed)) | ||
Development version: **16.3.x** ([release notes](https://github.com/hapijs/hapi/issues?labels=release+notes&page=1&state=closed)) | ||
[![Build Status](https://secure.travis-ci.org/hapijs/hapi.svg?branch=master)](http://travis-ci.org/hapijs/hapi) | ||
@@ -14,0 +14,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
184438
4539