Comparing version 0.6.12 to 0.7.0
@@ -26,5 +26,9 @@ var https = require('https'); | ||
} | ||
else { | ||
res.writeHead(404, { 'Content-Type' : 'text/html' }); | ||
res.end('Not found!'); | ||
else if (!res.finished) { | ||
process.nextTick(function () { | ||
if (!res.finished) { | ||
res.writeHead(404, { 'Content-Type' : 'text/html' }); | ||
res.end('Not found!'); | ||
} | ||
}); | ||
} | ||
@@ -31,0 +35,0 @@ }); |
@@ -12,5 +12,10 @@ var http = require('http'); | ||
} | ||
else { | ||
res.writeHead(404, { 'Content-Type' : 'text/html' }); | ||
res.end('not found'); | ||
else if (!res.finished) { | ||
process.nextTick(function () { | ||
if (!res.finished) { | ||
res.setCode = 404; | ||
res.setHeader('content-type', 'text/html'); | ||
res.end('not found'); | ||
} | ||
}); | ||
} | ||
@@ -17,0 +22,0 @@ }); |
@@ -18,3 +18,4 @@ var EventEmitter = require('events').EventEmitter; | ||
if (req.url === mount) { | ||
res.writeHead(200, { 'Content-Type' : 'text/javascript' }); | ||
res.statusCode = 200; | ||
res.setHeader('content-type', 'text/javascript'); | ||
res.end(dnodeSrc); | ||
@@ -32,5 +33,6 @@ } | ||
ev.request.unshift(function (req, res) { | ||
if (req.url === mount) { | ||
res.writeHead(200, { 'Content-Type' : 'text/javascript' }); | ||
ev.request.push(function (req, res) { | ||
if (!res.finished && req.url === mount) { | ||
res.statusCode = 200; | ||
res.setHeader('content-type', 'text/javascript'); | ||
res.end(dnodeSrc); | ||
@@ -37,0 +39,0 @@ } |
{ | ||
"name" : "dnode", | ||
"version" : "0.6.12", | ||
"version" : "0.7.0", | ||
"description" : "freestyle RPC", | ||
@@ -28,3 +28,3 @@ "main" : "./index.js", | ||
"traverse" : ">=0.3.1 <0.4", | ||
"browserify" : ">=0.4.13 <0.5", | ||
"browserify" : "1.0.x", | ||
"dnode-protocol" : ">=0.0.9 <0.1" | ||
@@ -39,3 +39,4 @@ }, | ||
"base" : "./browser", | ||
"require" : [ "dnode-protocol" ] | ||
"require" : [ "dnode-protocol" ], | ||
"dependencies" : {} | ||
}, | ||
@@ -42,0 +43,0 @@ "engine" : { |
@@ -37,9 +37,8 @@ var dnode = require('dnode'); | ||
catch (refErr) { | ||
assert.eql(refErr.message, errors.server[1].message); | ||
assert.eql(refErr.type, errors.server[1].type); | ||
process.nextTick(function () { | ||
assert.eql(refErr.message, errors.server[1].message); | ||
assert.eql(refErr.type, errors.server[1].type); | ||
assert.equal(errors.server.length, 2); | ||
}); | ||
} | ||
assert.equal(errors.server.length, 2); | ||
assert.eql(errors.client, [ 'Local error' ]); | ||
}); | ||
@@ -53,2 +52,6 @@ | ||
conn.on('end', function () { | ||
assert.eql(errors.client, [ 'Local error' ]); | ||
}); | ||
this.pow = function () { | ||
@@ -61,2 +64,3 @@ throw 'Local error'; | ||
remote.three(); | ||
setTimeout(function () { | ||
@@ -66,5 +70,5 @@ conn.end(); | ||
server.close(); | ||
}, 100); | ||
}, 500); | ||
}); | ||
}); | ||
}; |
Sorry, the diff of this file is not supported yet
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
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
136912
61
3298
8
+ Addedbrowserify@1.0.0(transitive)
+ Addedchainsaw@0.0.9(transitive)
+ Addedes5-shim@1.0.0(transitive)
+ Addedfile@0.1.1(transitive)
+ Addedsemver@1.0.14(transitive)
+ Addedseq@0.3.5(transitive)
- Removedbrowserify@0.4.15(transitive)
- Removedchainsaw@0.1.0(transitive)
- Removedes5-shim@4.6.7(transitive)
- Removedseq@0.2.5(transitive)
Updatedbrowserify@1.0.x