Commit 9715ebd4 authored by indexzero's avatar indexzero

[debug] Added some debugging to figure out why AB wont complete a test with v0.2.0

parent f291efba
...@@ -103,8 +103,12 @@ var createProxy = function () { ...@@ -103,8 +103,12 @@ var createProxy = function () {
sys.pump(req, reverse_proxy); sys.pump(req, reverse_proxy);
if (e) { if (e) {
sys.puts('end outgoing request');
req.removeListener('end', e); req.removeListener('end', e);
req.addListener('end', function () { reverse_proxy.end() }); req.addListener('end', function () {
sys.puts('request ended');
reverse_proxy.end()
});
} }
else { else {
reverse_proxy.end(); reverse_proxy.end();
...@@ -121,6 +125,7 @@ var createProxy = function () { ...@@ -121,6 +125,7 @@ var createProxy = function () {
response.addListener('end', function() { response.addListener('end', function() {
server.emit('proxy', null, data); server.emit('proxy', null, data);
}); });
sys.puts('response');
// Set the response headers of the client response // Set the response headers of the client response
res.writeHead(response.statusCode, response.headers); res.writeHead(response.statusCode, response.headers);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment