Diff

net/http/server.lua @ 4771:31a40da59308

net.http.server: Remove unused imports and variables (fixes traceback due to removed net.httpserver)
author Matthew Wild <mwild1@gmail.com>
date Sat, 28 Apr 2012 14:27:48 +0100
parent 4740:bd9c8bc8036f
child 4787:1d753fecf95b
line wrap: on
line diff
--- a/net/http/server.lua	Sat Apr 28 14:13:51 2012 +0100
+++ b/net/http/server.lua	Sat Apr 28 14:27:48 2012 +0100
@@ -12,8 +12,6 @@
 local debug = debug;
 local tostring = tostring;
 local codes = require "net.http.codes";
-local _G = _G;
-local legacy_httpserver = require "net.httpserver";
 
 local _M = {};
 
@@ -90,7 +88,7 @@
 	local secure = conn:ssl() and true or nil;
 	local pending = {};
 	local waiting = false;
-	local function process_next(last_response)
+	local function process_next()
 		--if waiting then log("debug", "can't process_next, waiting"); return; end
 		if sessions[conn] and #pending > 0 then
 			local request = t_remove(pending);
@@ -198,7 +196,7 @@
 	local result = events.fire_event(event, payload);
 	if result ~= nil then
 		if result ~= true then
-			local code, body = 200, "";
+			local body = "";
 			local result_type = type(result);
 			if result_type == "number" then
 				response.status_code = result;