Software / code / prosody
Comparison
plugins/mod_httpserver.lua @ 1812:e32593074602
mod_httpserver: Configurable filesystem path to serve from
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 21 Sep 2009 17:57:28 +0100 |
| parent | 1770:3e17002221eb |
| child | 1816:1c0bde3db7d8 |
comparison
equal
deleted
inserted
replaced
| 1811:4aa5e80d8ce3 | 1812:e32593074602 |
|---|---|
| 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 local check_http_path; | 14 local check_http_path; |
| 15 | 15 |
| 16 local http_base = "www_files"; | 16 local http_base = config.get("*", "core", "http_path") or "www_files"; |
| 17 | 17 |
| 18 local response_403 = { status = "403 Forbidden", body = "<h1>Invalid URL</h1>Sorry, we couldn't find what you were looking for :(" }; | 18 local response_403 = { status = "403 Forbidden", body = "<h1>Invalid URL</h1>Sorry, we couldn't find what you were looking for :(" }; |
| 19 local response_404 = { status = "404 Not Found", body = "<h1>Page Not Found</h1>Sorry, we couldn't find what you were looking for :(" }; | 19 local response_404 = { status = "404 Not Found", body = "<h1>Page Not Found</h1>Sorry, we couldn't find what you were looking for :(" }; |
| 20 | 20 |
| 21 local http_path = { http_base }; | 21 local http_path = { http_base }; |