Software /
code /
prosody
Comparison
plugins/mod_httpserver.lua @ 1816:1c0bde3db7d8
Merge with 0.5
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 24 Sep 2009 11:16:25 +0100 |
parent | 1771:39e6b986ef01 |
parent | 1812:e32593074602 |
child | 1870:5b5e4a4ecb55 |
comparison
equal
deleted
inserted
replaced
1807:3bb0e5170692 | 1816:1c0bde3db7d8 |
---|---|
10 local httpserver = require "net.httpserver"; | 10 local httpserver = require "net.httpserver"; |
11 | 11 |
12 local open = io.open; | 12 local open = io.open; |
13 local t_concat = table.concat; | 13 local t_concat = table.concat; |
14 | 14 |
15 local http_base = "www_files"; | 15 local http_base = config.get("*", "core", "http_path") or "www_files"; |
16 | 16 |
17 local response_400 = { status = "400 Bad Request", body = "<h1>Bad Request</h1>Sorry, we didn't understand your request :(" }; | 17 local response_400 = { status = "400 Bad Request", body = "<h1>Bad Request</h1>Sorry, we didn't understand your request :(" }; |
18 local response_404 = { status = "404 Not Found", body = "<h1>Page Not Found</h1>Sorry, we couldn't find what you were looking for :(" }; | 18 local response_404 = { status = "404 Not Found", body = "<h1>Page Not Found</h1>Sorry, we couldn't find what you were looking for :(" }; |
19 | 19 |
20 local function preprocess_path(path) | 20 local function preprocess_path(path) |