Mercurial > prosody-hg
comparison plugins/mod_http_file_share.lua @ 11330:f2c9492e3d25
mod_http_file_share: Fix the obligatory misplaced closing bracket (thanks scansion)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 27 Jan 2021 23:38:14 +0100 |
| parents | 2a431d3ad8f1 |
| children | 7a915fa49373 |
comparison
equal
deleted
inserted
replaced
| 11329:2a431d3ad8f1 | 11330:f2c9492e3d25 |
|---|---|
| 49 access = { type = "auth"; condition = "forbidden" }; | 49 access = { type = "auth"; condition = "forbidden" }; |
| 50 filename = { type = "modify"; condition = "bad-request"; text = "Invalid filename" }; | 50 filename = { type = "modify"; condition = "bad-request"; text = "Invalid filename" }; |
| 51 filetype = { type = "modify"; condition = "not-acceptable"; text = "File type not allowed" }; | 51 filetype = { type = "modify"; condition = "not-acceptable"; text = "File type not allowed" }; |
| 52 filesize = { type = "modify"; condition = "not-acceptable"; text = "File too large"; | 52 filesize = { type = "modify"; condition = "not-acceptable"; text = "File too large"; |
| 53 extra = {tag = st.stanza("file-too-large", {xmlns = namespace}):tag("max-file-size"):text(tostring(file_size_limit)) }; | 53 extra = {tag = st.stanza("file-too-large", {xmlns = namespace}):tag("max-file-size"):text(tostring(file_size_limit)) }; |
| 54 }; | |
| 54 filesizefmt = { type = "modify"; condition = "bad-request"; text = "File size must be positive integer"; } | 55 filesizefmt = { type = "modify"; condition = "bad-request"; text = "File size must be positive integer"; } |
| 55 }; | |
| 56 }); | 56 }); |
| 57 | 57 |
| 58 -- Convenience wrapper for logging file sizes | 58 -- Convenience wrapper for logging file sizes |
| 59 local function B(bytes) return hi.format(bytes, "B", "b"); end | 59 local function B(bytes) return hi.format(bytes, "B", "b"); end |
| 60 | 60 |
