Commit graph

40 commits

Author SHA1 Message Date
Kim Alvefur
ebdebb946d Merge 0.9->0.10 2016-01-08 16:16:08 +01:00
Matthew Wild
cb1eeb2386 mod_http_files: Santize the path relative to our base URL before translating it to a filesystem path, fixes a relative path traversal vulnerability 2016-01-07 15:37:47 +00:00
Kim Alvefur
23fa3312e7 Merge 0.9->0.10 2015-09-27 00:36:34 +02:00
Kim Alvefur
60ca835146 mod_http_files: Translate forward slashes to local directory separators 2015-09-26 19:35:56 +02:00
Kim Alvefur
a29f12e309 mod_http_files: Strip trailing directory separator regardless of directionality of the slash (fixes #545) 2015-09-26 19:34:58 +02:00
Kim Alvefur
f666a0d934 mod_http_files: Strip path separator from end of paths, was broken on Windows (thanks Junne) 2014-03-09 22:16:44 +01:00
Kim Alvefur
9ea9c5719a Merge 0.9->0.10 2014-03-09 23:47:53 +01:00
Florian Zeitz
1d833bb807 Remove all trailing whitespace 2013-08-09 17:48:21 +02:00
Kim Alvefur
fdacf5cb34 mod_http_files: Put the MIME type map in a global shared table instead of per-host 2013-06-28 19:34:57 +02:00
Kim Alvefur
360e2a5884 mod_http_files: Fix sending Content-Type for index files 2012-12-23 17:04:44 +01:00
Kim Alvefur
59db48f8cb mod_http_files: Allow passing a string to serve() 2012-12-23 11:17:44 +01:00
Kim Alvefur
4130b38a58 mod_http_files: Expose function other modules can use to combine their routes with file paths to serve 2012-12-21 20:40:29 +01:00
Kim Alvefur
87cf947c6c mod_http_files: Work with non-wildcard-routes. Key cache on the original HTTP path. 2012-12-21 20:34:40 +01:00
Kim Alvefur
da563cbf87 mod_http_files: Replace file listing with an event, allowing a different plugin to generate it 2012-12-21 20:08:33 +01:00
Kim Alvefur
cd27b11d36 mod_http_files: Export function can be used by other modules to serve files. Don't serve files by default unless http_files_dir is set 2012-12-21 17:54:43 +01:00
Kim Alvefur
8bf32f0b1c mod_http_files: Rename config options and variable names 2012-12-21 17:22:19 +01:00
Kim Alvefur
92abfa2d51 mod_http_files: Log the error if we can't open or read a file 2012-12-21 16:10:45 +01:00
Kim Alvefur
b1dd7b0be7 mod_http_files: Escape paths in redirects 2012-12-21 09:04:02 +01:00
Kim Alvefur
d1880e05fd mod_http_files: Only match on modification date when if-none-match is not present 2012-12-21 08:27:14 +01:00
Kim Alvefur
f098458b69 mod_http_files: Only serve cached data if etag is unchanged. 2012-12-21 08:25:09 +01:00
Kim Alvefur
0ff07edb45 mod_http_files: Make sure file extensions are not nil or empty string 2012-12-21 08:19:58 +01:00
Kim Alvefur
dc08340e9f mod_http_files: Avoid a bunch of table lookups 2012-12-21 08:14:33 +01:00
Kim Alvefur
e104ed8cac mod_http_files: No use in closing a file handle if we couldn't open it 2012-12-21 08:10:07 +01:00
Kim Alvefur
eaba58e39b mod_http_files: Compare If-Modified-Since to last modification date 2012-12-16 08:34:50 +01:00
Kim Alvefur
7c7e98953e mod_http_files: Fix caching the stringified directory index 2012-12-16 08:17:28 +01:00
Kim Alvefur
8c8d3b759f mod_http_files: Generate simple directory index. 2012-12-11 23:40:30 +01:00
Kim Alvefur
f0449e8428 mod_http_files: Have mimetypes in a shared table. Get mimetypes from /etc/mime.types if exists. 2012-12-11 23:21:25 +01:00
Kim Alvefur
f2336aa626 mod_http_files: Cache data read from disk in a weak table 2012-12-11 23:02:06 +01:00
Kim Alvefur
bcfa20dc80 mod_http_files: Add Last-Modified header 2012-12-11 22:30:50 +01:00
Kim Alvefur
84dcecb046 mod_http_files: Add ETag and check If-None-Match to allow client-side cache 2012-12-11 22:30:13 +01:00
Kim Alvefur
ed92fd78b6 mod_http_files: Return 404 faster if file does not exist 2012-12-11 22:26:41 +01:00
Kim Alvefur
9a459d35a4 mod_http_files: Configurable number of index files to check for 2012-12-11 22:14:55 +01:00
Kim Alvefur
090589dd4b mod_http_files: Respond with a 301 redirect for directories to append a / (fixes relative links) 2012-05-12 02:17:08 +02:00
Matthew Wild
e9de5a1a10 mod_http_files: Specify method in HTTP route 2012-04-27 18:40:44 +01:00
Matthew Wild
7c5c2aea2c mod_http_files, net.http.parser: Move path normalization to net.http.parser so that all modules can benefit 2012-04-26 16:48:16 +01:00
Matthew Wild
0c686d4e7a mod_http_files: Change option name from http_path to http_files_dir 2012-04-26 06:42:02 +01:00
Matthew Wild
19f0eb98bf mod_http_files: Log 404 failure reason 2012-04-26 06:30:29 +01:00
Matthew Wild
23e05cc038 mod_http_files: Return numeric error codes instead of custom error responses 2012-04-26 06:10:14 +01:00
Kim Alvefur
84e65b5745 mod_http_files: Rename argument to reflect what it actually is 2012-04-24 00:17:15 +02:00
Kim Alvefur
b12b795d37 mod_httpserver: Rename to mod_http_files 2012-04-23 23:37:43 +02:00
Renamed from plugins/mod_httpserver.lua (Browse further)