Comparison

net/httpserver.lua @ 1438:f02a5a982fac

Merged with trunk
author Waqas Hussain <waqas20@gmail.com>
date Sun, 28 Jun 2009 21:32:19 +0500
parent 1435:7a073b0a8f6a
child 1522:569d58d21612
comparison
equal deleted inserted replaced
1437:cf2eba9b1716 1438:f02a5a982fac
50 if response.body and request.method ~= "HEAD" then 50 if response.body and request.method ~= "HEAD" then
51 t_insert(resp, response.body); 51 t_insert(resp, response.body);
52 end 52 end
53 else 53 else
54 -- Response we have is just a string (the body) 54 -- Response we have is just a string (the body)
55 log("debug", "Sending response to %s: %s", request.id, response); 55 log("debug", "Sending response to %s: %s", request.id or "<none>", response or "<none>");
56 56
57 resp = { "HTTP/1.0 200 OK\r\n" }; 57 resp = { "HTTP/1.0 200 OK\r\n" };
58 t_insert(resp, "Connection: close\r\n"); 58 t_insert(resp, "Connection: close\r\n");
59 t_insert(resp, "Content-Length: "); 59 t_insert(resp, "Content-Length: ");
60 t_insert(resp, #response); 60 t_insert(resp, #response);