initial commit. phase 1 complete

This commit is contained in:
2026-05-05 20:45:19 +02:00
parent d9c68313a0
commit 89e058ffac
20631 changed files with 3224610 additions and 43 deletions
+26
View File
@@ -0,0 +1,26 @@
var events = require('events');
exports.DummyResponse = function( statusCode ) {
this.statusCode= statusCode;
this.headers= {};
}
exports.DummyResponse.prototype= events.EventEmitter.prototype;
exports.DummyResponse.prototype.setEncoding= function() {}
exports.DummyRequest =function( response ) {
this.response= response;
this.responseSent= false;
}
exports.DummyRequest.prototype= events.EventEmitter.prototype;
exports.DummyRequest.prototype.write= function(post_body){}
exports.DummyRequest.prototype.write= function(post_body){
this.responseSent= true;
this.emit('response',this.response);
}
exports.DummyRequest.prototype.end= function(){
if(!this.responseSent) {
this.responseSent= true;
this.emit('response',this.response);
}
this.response.emit('end');
}