The old implementation slurped the whole artefact into memory, and
did not ensure it remained allocated beyond the first call to write().
The new implementation uses mmap and ensures the mapping lasts until
the file has been delivered
The previous implementation meant that messages could get lost if
both sending and receiving were scheduled to be processed in the
same event loop cycle. This commit separates the two channels
more clearly, while still allowing the close event in the receive
side to cancel the whole pipeline
Part of #49 refactor
Now that capnp/kj provides http and websocket functions, replace
the excellent websocketpp library with the kj functions. This
removes a dependency and allows for more consistent idiomatic
code. Thanks websocketpp, it was great to have you along!
This should enable parts of the refactor described in #49
Improve the linking of binary resources so the content is in .rodata
and the object contains a read-only flagged GNU-stack note. This causes
GNU ld to not mark the stack executable in the final binary.
Resolves#55
Caddy (and probably other webservers) add a Content-Type header
when one was not supplied by the application backend. Under Chromium,
the css file is not interpreted if the webserver delivers it with
Content-Type: text/plain, althugh it does work if no Content-Type
header is set. To prevent the frontend proxy from adding the wrong
header, set it correctly in the first place
Fixes a crash that happens on g++ 6.3 under debian but not
g++ 7.2.1 under arch. Instead of trying to move kj::AsyncIoStream
between each promise handler, just extract and use the raw
pointer and let attach() clean up the Own<> at the end
Read or writes to bad file descriptors threw exceptions, just log
this instead. Also make sure that LaminarClients are removed from
the list of clients when a connection is aggressively dropped, and
add test
On 32-bit Linux, time_t is a long. Laminar extensively uses
time_t but provided only int and int64 db access, making the
use of long ambiguous. Since there is no explicit use of int64,
and because on 32-bit Linux long and int are recognized as
different types despite being the same width, replacing the
int64 handlers with long handlers fixes the compile error
This implements web notifications on job completion. Opt-in
by default, the preference is saved in js localStorage and
can be toggled directly on any page
Now explicitly closed connections on the client side are
closed with a clean error code. This is motivated by upcoming
work to detect broken websockets and automatically reconnect