equal
deleted
inserted
replaced
11 |
11 |
12 local r_err = "\n<html>\n<head>\n<title>Prosody's Stanza Counter - Error %s</title>\n<meta name=\"robots\" content=\"noindex, nofollow\" />\n</head>\n\n<body>\n<h3>%s</h3>\n</body>\n\n</html>\n" |
12 local r_err = "\n<html>\n<head>\n<title>Prosody's Stanza Counter - Error %s</title>\n<meta name=\"robots\" content=\"noindex, nofollow\" />\n</head>\n\n<body>\n<h3>%s</h3>\n</body>\n\n</html>\n" |
13 |
13 |
14 local function res(event, code, body, extras) |
14 local function res(event, code, body, extras) |
15 local response = event.response |
15 local response = event.response |
16 |
16 |
17 if extras then |
17 if extras then |
18 for header, data in pairs(extras) do response.headers[header] = data end |
18 for header, data in pairs(extras) do response.headers[header] = data end |
19 end |
19 end |
20 |
20 |
21 response.status_code = code |
21 response.status_code = code |