Comparing version 7.0.0 to 7.0.1
@@ -149,2 +149,6 @@ 'use strict'; | ||
if (settings.onRequest) { | ||
settings.onRequest(promise.req); | ||
} | ||
try { | ||
@@ -155,3 +159,3 @@ res = await promise; | ||
if (settings.onResponse) { | ||
return settings.onResponse.call(bind, error, res, h, settings, ttl); | ||
return settings.onResponse.call(bind, error, res, request, h, settings, ttl); | ||
} | ||
@@ -172,6 +176,2 @@ | ||
if (settings.onRequest) { | ||
settings.onRequest(promise.req); | ||
} | ||
if (settings.onResponse) { | ||
@@ -178,0 +178,0 @@ return settings.onResponse.call(bind, null, res, request, h, settings, ttl); |
{ | ||
"name": "h2o2", | ||
"description": "Proxy handler plugin for hapi.js", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"repository": "git://github.com/hapijs/h2o2", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
@@ -495,2 +495,9 @@ 'use strict'; | ||
const upstream = Hapi.Server(); | ||
let upstreamRequested = false; | ||
upstream.events.on('request', () => { | ||
upstreamRequested = true; | ||
}); | ||
await upstream.start(); | ||
@@ -502,2 +509,3 @@ | ||
called = true; | ||
expect(upstreamRequested).to.be.false(); | ||
expect(req).to.be.an.instanceof(Http.ClientRequest); | ||
@@ -673,2 +681,3 @@ }; | ||
expect(h.response).to.exist(); | ||
throw err; | ||
@@ -675,0 +684,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
82197
1495