diff --git a/net/Router.js b/net/Router.js index db51b6e..c15b6b0 100644 --- a/net/Router.js +++ b/net/Router.js @@ -82,6 +82,7 @@ Router.prototype.route = function() } } + this.setRoute( "*", currentRoute ); this.routable = false; return false; }; diff --git a/net/WebFrame.js b/net/WebFrame.js index 7fedf0c..591a4f5 100644 --- a/net/WebFrame.js +++ b/net/WebFrame.js @@ -18,6 +18,7 @@ var Framework = function( garden ) { this.HTTP.response.statusCode = 404; this.result = "404 Not Found"; + this.plantResult(); }.bind( this ) } }; @@ -70,6 +71,12 @@ Framework.prototype.parseResult = function() continue; } } + else if( method === false ) + { + Dragonfly.Log( "No route is defined to handle this URI", Dragonfly.Spheres.THERMO ); + this.router.routeObj.reroute( "404", true ); + continue; + } throw new FatalError( "Relay handler \"" + method + "\" is not defined" ); }