That would previously result in the worker getting killed with SIGPIPE.
Which works, but we can also recover from that error without restarting
the process.
Because this easily confuses syntax highlighters and some humans with
the q// string syntax. Also for consistency with the 'fu->sql()'
aliases.
The old names are still available as alias.
URI, JSON and formdata decoding no longer checks for control characters,
but FU::Validate now rejects control characters by default. This
decouples semantic validation from format parsing and gives better
control over when control characters are allowed.
This changes the way that file changes are detected. The upside is that
it now correctly detects changes that happened after the code has loaded
but before the first request came in, the downside is that it now gets
stuck on reloading when a file has a future mtime.
Turns out this is necessary even if the fd is going to be passed through
exec() soon, because the supervisor might receive multiple fds before
spawning another process, in which case all of them are going to be
passed to the new process instead of just one.
And use it for automatic output compression in FU, as (potentially)
faster alternative to Compress::Raw::Zlib.
Was also planning to maybe add support for Zstd or Brotli, but given the
performance of libdeflate, I'm not sure that's really necessary. Brotli
does tend to do a better job at compressing HTML, though.
API is not super convenient and implementation is lousy, but uploading
files is not a super common operation so that should be fine.
At least it supports large files with only a single in-memory copy.
Compress::Zstd decided to bundle libzstd instead of linking to the
system lib, and it predictably hasn't been updated in 6 years. I
consider that broken to the point of DO-NOT-USE.
Maybe I'll do a custom dlopen() wrapper for that later, but for now
let's just stick with gzip.