Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Added regression test for issue #44
Browse files Browse the repository at this point in the history
  • Loading branch information
benw authored and ry committed Jan 12, 2010
1 parent f379b77 commit a3631a3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/mjsunit/test-http-eof-on-connect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
tcp = require("tcp");
http = require("http");

// This is a regression test for http://github.com/ry/node/issues/#issue/44
// It is separate from test-http-malformed-request.js because it is only
// reproduceable on the first packet on the first connection to a server.
port = 9999;

server = http.createServer(function (req, res) {});
server.listen(port);

tcp.createConnection(port).addListener("connect", function () {
this.close();
}).addListener("close", function () {
server.close();
});

0 comments on commit a3631a3

Please sign in to comment.