Comparing version 1.0.2 to 1.0.3
@@ -91,3 +91,3 @@ (function () { | ||
AppServer.prototype.handleRequest = function (request, response, thisp) { | ||
res = new worker.response(response, request, thisp.getRoutes()); | ||
var res = new worker.response(response, request, thisp.getRoutes()); | ||
@@ -94,0 +94,0 @@ if (typeof(this.options.checkRoute) === 'function') { |
@@ -20,20 +20,20 @@ (function () { | ||
try { | ||
var file = base + '/' + pathname; | ||
var stats = fs.statSync(file); | ||
var file = base + '/' + pathname; | ||
fs.stat(file, function (err, stats) { | ||
if (err !== null) { | ||
response.next(); | ||
} else { | ||
fs.readFile(file, "binary", function (err, data) { | ||
if (err !== null) { | ||
response.next(); | ||
} else { | ||
response.setHeader('ContentType', mime.lookup(file)); | ||
response.write(data); | ||
if (stats) { | ||
var data = fs.readFileSync(file, "binary"); | ||
if (data) { | ||
response.setHeader('ContentType', mime.lookup(file)); | ||
response.write(data); | ||
response.end(); | ||
} | ||
response.end(); | ||
} | ||
}); | ||
} | ||
} catch (error) { | ||
response.next(); | ||
} | ||
}); | ||
}; | ||
})(); |
@@ -75,4 +75,2 @@ (function () { | ||
} | ||
this.next(); | ||
}; | ||
@@ -143,3 +141,3 @@ | ||
if (this._ended) { | ||
throw new Exception('Error: unable to write(), end() has been run'); | ||
throw 'Error: unable to write(), end() has been run'; | ||
} else { | ||
@@ -146,0 +144,0 @@ this.buffers.push(data); |
@@ -5,8 +5,10 @@ { | ||
"description": "Bricks Application Server", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"homepage": "http://bricksjs.com/", | ||
"preferGlobal": "true", | ||
"repository": { | ||
"url": "" | ||
"type": "git", | ||
"url": "http://github.com/JerrySievert/bricks.git" | ||
}, | ||
"license" : "MIT/X11", | ||
"main": "./lib/appserver.js", | ||
@@ -13,0 +15,0 @@ "engines": { |
@@ -37,2 +37,3 @@ var vows = require('vows'), | ||
}); | ||
response.end(); | ||
}, { 'section': 'main' }); | ||
@@ -58,2 +59,3 @@ | ||
}); | ||
response.end(); | ||
}, { 'section': 'post' }); | ||
@@ -79,2 +81,3 @@ | ||
}); | ||
response.end(); | ||
}, { 'section': 'final' }); | ||
@@ -81,0 +84,0 @@ |
@@ -92,3 +92,3 @@ var vows = require('vows'), | ||
}); | ||
setTimeout(function() { thisp.callback('callback not fired'); }, 50); | ||
var res = new mresponse.response(); | ||
@@ -101,3 +101,3 @@ var req = new mrequest.request(); | ||
'results from run': function (err, request, response, options) { | ||
assert.equal(err, undefined); | ||
assert.equal(err, 'callback not fired'); | ||
} | ||
@@ -104,0 +104,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
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
42689
844
3
1