Kim Alvefur <zash@zash.se> [Sun, 02 Aug 2020 00:24:54 +0200] rev 11028
mod_net_multiplex: Set read size/mode to that of the target listener
Otherwise it would use the configured buffer size, or previously '*a'.
Using the read size set by the listener seems more sensible.
Kim Alvefur <zash@zash.se> [Sun, 02 Aug 2020 00:22:57 +0200] rev 11027
mod_net_multiplex: Read no more than the max buffer size setting
Otherwise the '*a' read mode applies, which under certain circumstances
can read infinite amounts of data into memory.
Kim Alvefur <zash@zash.se> [Sat, 01 Aug 2020 18:41:30 +0200] rev 11026
mod_http: Add way to signal that a module supports streaming uploads
Fixes #726
API:
module:provides("http", {
streaming_uploads = true;
route = {
PUT = function (event)
event.request.body_sink = io.tmpfile();
return true;
end
}
})
Kim Alvefur <zash@zash.se> [Sat, 01 Aug 2020 18:41:23 +0200] rev 11025
net.http.parser: Allow specifying sink for large request bodies
This enables uses such as saving uploaded files directly to a file on
disk or streaming parsing of payloads.
See #726
Kim Alvefur <zash@zash.se> [Sat, 01 Aug 2020 18:14:09 +0200] rev 11024
net.http.parser: Switch to util.dbuffer for buffering incoming data
This is primarily a step towards saving uploads directly to files, tho
this should hopefully be more efficient than collapsing the entire
buffer to a single string every now and then.
Kim Alvefur <zash@zash.se> [Sat, 08 Aug 2020 19:13:12 +0200] rev 11023
Merge 0.11->trunk
Kim Alvefur <zash@zash.se> [Sat, 01 Aug 2020 12:58:37 +0200] rev 11022
mod_s2s: Escape invalid XML in loggin (same way as mod_c2s) fix #1574
Matthew Wild <mwild1@gmail.com> [Sat, 08 Aug 2020 13:14:11 +0100] rev 11021
Merge 0.11->trunk
Matthew Wild <mwild1@gmail.com> [Sat, 08 Aug 2020 13:13:50 +0100] rev 11020
net.http: Add request:cancel() method
This is a new API that should be used in preference to http.destroy_request()
when possible, as it ensures the callback is always called (with an error of
course).
APIs that have edge-cases where they don't call callbacks have, from experience,
shown to be difficult to work with and often lead to unintentional leaks when
the callback was expected to free up certain resources.
Matthew Wild <mwild1@gmail.com> [Sat, 08 Aug 2020 13:11:11 +0100] rev 11019
net.http: Re-expose destroy_request() function
This was accidentally turned private in 647adfd8f738 as part of refactoring
for Lua 5.2+.