From d6110fbd115e6e6a978b807e97f00791f4d2e80f Mon Sep 17 00:00:00 2001 From: Micheil Smith Date: Fri, 30 Apr 2010 23:35:51 +1000 Subject: [PATCH] Making requestListener for the construction of a http.Server optional, as it is for net.Server --- lib/http.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/http.js b/lib/http.js index 7cea1d71a6f..90feb8a282d 100644 --- a/lib/http.js +++ b/lib/http.js @@ -521,7 +521,11 @@ function flushMessageQueue (socket, queue) { function Server (requestListener) { net.Server.call(this); - this.addListener("request", requestListener); + + if(requestListener){ + this.addListener("request", requestListener); + } + this.addListener("connection", connectionListener); } sys.inherits(Server, net.Server);