Removed unused ISE, added framework header
This commit is contained in:
parent
d3e8b0efa7
commit
c280ecc9b3
@ -6,7 +6,7 @@ function error( msg )
|
|||||||
var e = new Error();
|
var e = new Error();
|
||||||
e = e.stack.split( "\n" );
|
e = e.stack.split( "\n" );
|
||||||
e[0] = this.name;
|
e[0] = this.name;
|
||||||
e[1] = "";
|
e[1] = msg;
|
||||||
|
|
||||||
this.stack = e.join( "\n" );
|
this.stack = e.join( "\n" );
|
||||||
}
|
}
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
function error( msg )
|
|
||||||
{
|
|
||||||
this.name = "Internel Server Error";
|
|
||||||
this.message = msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
error.prototype.toString = function()
|
|
||||||
{
|
|
||||||
return this.name + " " + this.message;
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = error;
|
|
@ -11,7 +11,7 @@ var Framework = function( garden )
|
|||||||
|
|
||||||
var Router = require( "./Router" );
|
var Router = require( "./Router" );
|
||||||
this.router = new Router( garden );
|
this.router = new Router( garden );
|
||||||
this.router.addRoute( "404", false, "p404" );
|
this.router.addRoute( "404", false, "404" );
|
||||||
|
|
||||||
this.handlers = {
|
this.handlers = {
|
||||||
"404": function()
|
"404": function()
|
||||||
|
@ -9,7 +9,8 @@ var HTTP = function( req, res )
|
|||||||
this.response = {
|
this.response = {
|
||||||
statusCode: 200
|
statusCode: 200
|
||||||
, headers: {
|
, headers: {
|
||||||
'Content-Type': 'text/html'
|
"Content-Type": "text/html"
|
||||||
|
, "Powered-By": "Botanical Framework (Node.js)"
|
||||||
}
|
}
|
||||||
, write: function( str ) { _self.response.content = str }
|
, write: function( str ) { _self.response.content = str }
|
||||||
, writeLine: function( str ) { _self.response.content += str + "\n"; }
|
, writeLine: function( str ) { _self.response.content += str + "\n"; }
|
||||||
|
Loading…
Reference in New Issue
Block a user