Created
February 20, 2011 14:40
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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