Skip to content

Instantly share code, notes, and snippets.

@schamane
Created February 20, 2011 14:40
Show Gist options
  • Save schamane/836015 to your computer and use it in GitHub Desktop.
Save schamane/836015 to your computer and use it in GitHub Desktop.
nodejs 0.4.1 patch for the test-http-agent2.js simple test
diff --git a/test/simple/test-http-agent2.js b/test/simple/test-http-agent2.js
index eed1cb9..83e5670 100644
--- a/test/simple/test-http-agent2.js
+++ b/test/simple/test-http-agent2.js
@@ -5,9 +5,6 @@ var http = require('http');
var reqEndCount = 0;
var server = http.Server(function(req, res) {
- res.writeHead(200);
- res.end("hello world\n");
-
var buffer = '';
req.setEncoding('utf8');
@@ -19,6 +16,8 @@ var server = http.Server(function(req, res) {
req.on('end', function() {
reqEndCount++;
assert.equal(body, buffer);
+ res.writeHead(200);
+ res.end(buffer);
});
});
@@ -26,7 +25,7 @@ var responses = 0;
var N = 10;
var M = 10;
-var body = ''
+var body = '';
for (var i = 0; i < 1000; i++) {
body += 'hello world';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment