summaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2024-01-29 11:35:13 +0000
committerAndrew Clayton <a.clayton@nginx.com>2024-02-21 16:20:32 +0000
commitac3a54d67181bb8bfbe6753058941c91dd200c63 (patch)
tree80ffa344a4405d8551e484c781b4d289a9c6b2c1 /.github
parent79c817724799a3c6ce88693b188926b4e626807f (diff)
downloadunit-ac3a54d67181bb8bfbe6753058941c91dd200c63.tar.gz
unit-ac3a54d67181bb8bfbe6753058941c91dd200c63.tar.bz2
Wasm-wc: Improve request buffer handling
When Unit receives a request, if the body of that request is greater than a certain amount (16KiB by default) then it is written to a temporary file. When a language module goes to read the request body in such situations it will end up using read(2). The wasm-wasi-component language module was failing to properly read request bodies of around 2GiB or more. This is because (on Linux at least) read(2) (and other related system calls) will only read (or write) at most 0x7ffff000 (2,147,479,552) bytes, this is the case for both 32 and 64-bit systems. Regardless, it's probably not a good idea doing IO in such large chunks anyway. This patch changes the wasm-wasi-component language module to read the request buffer in 32MiB chunks (this matches the original 'wasm' language module). We are still limited to a 4GiB address space and can only upload files a little under 4GiB. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions