Comparison

net/http/server.lua @ 4633:92e1a538f8b0

net.http.server: Missing <title/> in 404 Not Found response.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 21 Apr 2012 17:37:00 +0500
parent 4631:fc5d3b053454
child 4634:8e582afc214d
comparison
equal deleted inserted replaced
4632:52b6901cabb0 4633:92e1a538f8b0
201 end 201 end
202 else 202 else
203 log("debug", "No handler found"); 203 log("debug", "No handler found");
204 response.status_code = 404; 204 response.status_code = 404;
205 response.headers.content_type = "text/html"; 205 response.headers.content_type = "text/html";
206 response:send("<html><head>404 Not Found</head><body>404 Not Found: No such page.</body></html>"); 206 response:send("<html><head><title>404 Not Found</title></head><body>404 Not Found: No such page.</body></html>");
207 end 207 end
208 end 208 end
209 209
210 function _M.add_handler(event, handler, priority) 210 function _M.add_handler(event, handler, priority)
211 events.add_handler(event, handler, priority); 211 events.add_handler(event, handler, priority);