net/http/server.lua
branch0.12
changeset 12835 1cdaf21584da
parent 11531 eaff6e548f12
child 12837 8cbb109ff7ec
child 12889 3a6dae39c70e
--- a/net/http/server.lua	Sun Jan 01 16:20:58 2023 +0100
+++ b/net/http/server.lua	Sun Jan 08 13:35:04 2023 +0100
@@ -377,12 +377,12 @@
 			-- io.write("."); io.flush();
 			response.conn:write(chunk);
 		else
+			incomplete[response.conn] = nil;
 			if chunked then
 				response.conn:write("0\r\n\r\n");
 			end
 			-- io.write("\n");
 			if f.close then f:close(); end
-			incomplete[response.conn] = nil;
 			return response:done();
 		end
 	end