Changeset

2371:7ddb8ce0cd0b

net.httpserver: Fix usage of old connection API syntax
author Matthew Wild <mwild1@gmail.com>
date Thu, 17 Dec 2009 20:10:11 +0000
parents 2370:d783c8de379d
children 2372:bb88b76c21d0
files net/httpserver.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/net/httpserver.lua	Thu Dec 17 19:01:57 2009 +0000
+++ b/net/httpserver.lua	Thu Dec 17 20:10:11 2009 +0000
@@ -183,7 +183,7 @@
 		
 		request.url = url_parse(request.path);
 		
-		log("debug", method.." request for "..tostring(request.path) .. " on port "..request.handler.serverport());
+		log("debug", method.." request for "..tostring(request.path) .. " on port "..request.handler:serverport());
 		
 		if request.onlystatus then
 			if not call_callback(request) then
@@ -201,7 +201,7 @@
 
 -- The default handler for requests
 default_handler = function (method, body, request)
-	log("debug", method.." request for "..tostring(request.path) .. " on port "..request.handler.serverport());
+	log("debug", method.." request for "..tostring(request.path) .. " on port "..request.handler:serverport());
 	return { status = "404 Not Found", 
 			headers = { ["Content-Type"] = "text/html" },
 			body = "<html><head><title>Page Not Found</title></head><body>Not here :(</body></html>" };
@@ -229,7 +229,7 @@
 		else
 			log("debug", "Request has no destroy callback");
 		end
-		request.handler.close()
+		request.handler:close()
 		if request.conn then
 			listener.ondisconnect(request.handler, "closed");
 		end