Kim Alvefur
020cd46f03
util.prosodyctl.cert: Fix for prompt functions having moved to util.human.io
5 years ago
Kim Alvefur
fd7e6d3731
Merge 0.11->trunk
5 years ago
Kim Alvefur
63f44f3640
mod_pubsub: Fix notification stanza type setting ( fixes #1605 )
5 years ago
Kim Alvefur
238b2bfc1c
Merge 0.11->trunk
5 years ago
Kim Alvefur
ce3e3808f5
mod_pubsub: Lower priority of default <body> generator
...
in order to avoid conflict with a handler at the default (0) priority,
making it easier to write your own formatting in plugins.
this follows the common pattern of default modules having lower priority
5 years ago
Matthew Wild
48521ba153
util.cache: Add __name to metatable
5 years ago
Matthew Wild
1ab96f2289
tools.modtrace: Pass config to serialize()
5 years ago
Matthew Wild
f80e643a0e
util.dbuffer: Add __name to metatable
5 years ago
Matthew Wild
7312a610d4
tools.modtrace: Library for tracing/debugging Lua module and method calls
5 years ago
Kim Alvefur
53e6579aab
tools/form2table: Convert XEP-0004 dataform from XML to util.dataforms Lua format
...
Used this to generate code for a number of PubSub forms IIRC
5 years ago
Kim Alvefur
4d9e30aff3
tools/linedebug: Print each line of source executed
...
The extremely verbose debug output. Nice for getting some idea which
code runs most often, or where it pauses for no reason etc.
5 years ago
Kim Alvefur
43ec58831c
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
...
Useful for comparing what you think you have in your config with what
Prosody sees, e.g. wrt (lack of) significance of indentation, order of
options vs scope etc. (global options do not go at the end!)
Could probably be turned into a prosodyctl command, especially if it
learns to redact secrets and passwords.
5 years ago
Kim Alvefur
4cb9c49d95
tools/tb2err: Formats Lua traceback in errors.err format
...
Manually opening to the files and line numbers from a Lua traceback is
tedious. This tool converts tracebacks into a format that many compilers
and such tools use, which is also compatible with Vim (and possibly
other editors).
Thus if someone sends you a pastebin link with a traceback, a command
like the following gets you right to the relevant lines:
curl paste.example/abc123.txt | tb2err > errors.err; vim -q
5 years ago
Matthew Wild
9cb2fdc461
Merge 0.11->trunk
5 years ago
Matthew Wild
01c5bf5529
util.dbuffer: Optimize :sub() and :byte()
5 years ago
Kim Alvefur
7af694f510
mod_pubsub: Comment on itemstore type
5 years ago
Kim Alvefur
c34989f57e
mod_pubsub: Clarify kind of item store created
...
Planning to make this configurable, so good to distinguish it from
future backends.
5 years ago
Kim Alvefur
3133ff234a
mod_pubsub: Don't set store as metatable
...
'archive' is not a metatable here, so this has no effect. Remove since
apparently nothing depends on this.
5 years ago
Matthew Wild
b50d4b2ef0
net.http: Add support for streaming chunked/large responses
5 years ago
Matthew Wild
bc402b6409
net.http.parser: Expose 'partial', 'chunked' and 'body_length' on packets
5 years ago
Matthew Wild
a095a0c533
util.debug: Fix locals being reported under wrong stack frame in some cases (+tests!!)
5 years ago
Kim Alvefur
20fc0c9c15
Back out changeset 2c1583bb0e0f
...
Same reason as 712b2e6a09d9
5 years ago
Kim Alvefur
bad47be8f9
Back out 6dde2c9fa272: Doesn't work on Lua 5.1
5 years ago
Kim Alvefur
9b8a54345f
util.strbitop: Remove redundant init function
...
When you have 3 almost identical functions, you tend to edit one and
then copypaste. Forgot to remove this line from the other two.
5 years ago
Kim Alvefur
da8eca639a
util.strbitop: Create buffer in the correct size (optimization)
...
This avoids dynamically growing the buffer as Lua does when luaL_addchar
is used, thus saving on realloc calls.
5 years ago
Kim Alvefur
d5161fbf6f
util.strbitop: Add tests covering basics
...
Also as docs
5 years ago
Kim Alvefur
539255c692
util.strbitop: Reformat code
...
astyle \
--indent=tab \
--attach-classes \
--indent-switches \
--break-blocks \
--pad-oper \
--unpad-paren \
--add-braces \
--align-pointer=name \
--lineend=linux \
*.c
5 years ago
Matthew Wild
64856637ce
net.websocket.frames: Add test for empty frame with MASK and key set
5 years ago
Kim Alvefur
00bad1a9fe
net.websocket.frames: Use C string XOR implementation
5 years ago
Kim Alvefur
5b33f834fa
util.paths: Optimize path joining with few arguments
...
A casual search suggests that the majority of paths.join() calls involve
only two arguments. This saves the creation of a table for up to 3
arguments.
Looks like 3x faster for 3 arguments or less, 5% slower when it uses the
array to concatenate.
5 years ago
Kim Alvefur
c812a98068
util_paths_spec: Trim trailing white space
...
And add spacing between describe() blocks
5 years ago
Kim Alvefur
fce45aff34
util.paths: Add some tests
5 years ago
Kim Alvefur
6b306e3313
MUC: Remove XEP-0091: Legacy Delayed Delivery
...
Why do we still include this? Deprecated in 2007, obsoleted in 2009.
Removes redundant timestamp that nobody should be looking at since many
years and a redundant copy of the room JID.
5 years ago
Matthew Wild
8f059290a7
mod_posix: Hook and fire events on SIGUSR1/2
5 years ago
Matthew Wild
2cd0521696
Merge 0.11->trunk
5 years ago
Kim Alvefur
eefbd36485
Merge 0.11->trunk
5 years ago
Kim Alvefur
203b48b127
util.sasl.scram: Use util.strbitop for XOR step
6 years ago
Kim Alvefur
4d1b9f7c60
Merge 0.11->trunk
5 years ago
Kim Alvefur
66f3fe9d12
Merge 0.11->trunk
5 years ago
Matthew Wild
4f4140fbc3
Merge 0.11->trunk
5 years ago
Matthew Wild
58e33e3995
util.error: Pass through existing error objects passed to new()
5 years ago
Matthew Wild
7672305919
Merge 0.11->trunk
5 years ago
Matthew Wild
518904b66c
net.http.server: Don't send Content-Length on 1xx/204 responses, per RFC ( fixes #1596 )
5 years ago
Kim Alvefur
b0393fe9e1
Merge 0.11->trunk
5 years ago
Kim Alvefur
fb63187afc
net.websocket.frames: Read buffer length correctly in Lua 5.1 ( fix #1598 )
...
COMPAT: The __len metamethod does not work with tables in Lua 5.1.
Both strings and util.dbuffer now expose their length as a :len()
method.
5 years ago
Kim Alvefur
d3b3e21720
util.dbuffer: Expose length as :len() method, like strings
...
Ref #1598
5 years ago
Kim Alvefur
b4af560c97
mod_http_errors: Remove 'extra' element when empty
5 years ago
Kim Alvefur
6518e5f41b
mod_http_errors: Dark theme!
5 years ago
Kim Alvefur
09e8795afb
mod_http_errors: Use a class on extra data section
...
This CSS selector makes it awkward to add more items.
5 years ago
Matthew Wild
c07d15cf71
util.startup: Handle missing nparams field from debug info (not present in 5.1)
5 years ago