if ( !REGEX_GET.test( method ) && !REGEX_HEAD.test( method ) ) {
if ( this.allowed( method, req.url, host ) ) {
status = this.codes.SERVER_ERROR;
}
else {
status = this.codes.NOT_ALLOWED;
}
}
}
body = this.page( status, host );
return this.respond( req, res, body, status, {"Cache-Control": "no-cache", "Content-Length": body.length} );
};
Method error
Error handler for requests
Parameters:
req must be an Object.
(Request Object)
res must be an Object.
(Response Object)
status must be a Number.
([Optional] HTTP status code)
Returns an Object
(TurtleIO instance)