Ignore observers that are not indicative of demand-matchers.
This commit is contained in:
parent
5d314f01db
commit
32cc933513
|
@ -63,6 +63,13 @@ function _server(host, port, httpsOptions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
during Observe(Request(_, server, $method, $pathPattern, _, _)) {
|
during Observe(Request(_, server, $method, $pathPattern, _, _)) {
|
||||||
|
if (typeof method !== 'string' ||
|
||||||
|
(typeof pathPattern !== 'object' || pathPattern === null ||
|
||||||
|
typeof pathPattern.toJS !== 'function')) {
|
||||||
|
// Likely some kind of logging observer.
|
||||||
|
// TODO: reconsider schema
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (method.toLowerCase() !== method) {
|
if (method.toLowerCase() !== method) {
|
||||||
console.warn('HTTP method should be lowercase: ' + method);
|
console.warn('HTTP method should be lowercase: ' + method);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue