Changeset

1435:7a073b0a8f6a

net.httpserver: Don't upset logger when response is nil
author Matthew Wild <mwild1@gmail.com>
date Sun, 28 Jun 2009 14:17:07 +0100
parents 1433:e7bd00e70973
children 1436:064cb5328ac5
files net/httpserver.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/httpserver.lua	Sun Jun 28 02:46:36 2009 +0100
+++ b/net/httpserver.lua	Sun Jun 28 14:17:07 2009 +0100
@@ -52,7 +52,7 @@
 		end
 	else
 		-- Response we have is just a string (the body)
-		log("debug", "Sending response to %s: %s", request.id, response);
+		log("debug", "Sending response to %s: %s", request.id or "<none>", response or "<none>");
 		
 		resp = { "HTTP/1.0 200 OK\r\n" };
 		t_insert(resp, "Connection: close\r\n");