diff --git a/node_http.cc b/node_http.cc index 089317d5eb..f530976ac0 100644 --- a/node_http.cc +++ b/node_http.cc @@ -544,14 +544,10 @@ Init_http (Handle target) { HandleScope scope; - Local http = Object::New(); - target->Set (String::NewSymbol("HTTP"), http); - Local server_t = FunctionTemplate::New(server_constructor); server_t->InstanceTemplate()->SetInternalFieldCount(1); - http->Set(String::New("Server"), server_t->GetFunction()); - + target->Set(String::New("HTTPServer"), server_t->GetFunction()); path_str = Persistent::New( String::NewSymbol("path") ); uri_str = Persistent::New( String::NewSymbol("uri") ); diff --git a/spec/index.html b/spec/index.html index d6fd96a8aa..50772e4177 100644 --- a/spec/index.html +++ b/spec/index.html @@ -86,10 +86,19 @@ spawn() to start a new context/event loop?

2 HTTP Server

+
[Constructor(in String host, in String port)]
+interface HTTPServer  {
+  readonly attribute String host;
+  readonly attribute String port;
+
+  // networking                
+    attribute Function onRequest;
+  void close(); // yet not implemented
+};

3 TCP Client

[Constructor(in String host, in String port)]
-  interface TCPClient  {
+interface TCPClient  {
   readonly attribute String host;
   readonly attribute String port;
 
diff --git a/test/test_http_server_echo.rb b/test/test_http_server_echo.rb
index 55c97cfba7..1d3e1e3f3a 100755
--- a/test/test_http_server_echo.rb
+++ b/test/test_http_server_echo.rb
@@ -32,7 +32,7 @@ function encode(data) {
 }
 
 var port = 8000;
-var server = new HTTP.Server("localhost", port);
+var server = new HTTPServer("localhost", port);
 
 server.onRequest = function (request) {