Browse Source

Making requestListener for the construction of a http.Server optional, as it is for net.Server

v0.7.4-release
Micheil Smith 15 years ago
committed by Ryan Dahl
parent
commit
d6110fbd11
  1. 4
      lib/http.js

4
lib/http.js

@ -521,7 +521,11 @@ function flushMessageQueue (socket, queue) {
function Server (requestListener) { function Server (requestListener) {
net.Server.call(this); net.Server.call(this);
if(requestListener){
this.addListener("request", requestListener); this.addListener("request", requestListener);
}
this.addListener("connection", connectionListener); this.addListener("connection", connectionListener);
} }
sys.inherits(Server, net.Server); sys.inherits(Server, net.Server);

Loading…
Cancel
Save