Simon Cruanes
7eaaf432e4
compat fix
2024-02-05 01:10:23 -05:00
Simon Cruanes
4dce594c32
remove deps of tiny_httpd_ws
...
vendoring dbuenzli's code is neat!
2024-02-05 01:07:34 -05:00
Simon Cruanes
a405fb046d
expose client address to websocket
2024-02-05 01:07:34 -05:00
Simon Cruanes
e1f2edb0ab
feat: first draft of the websocket library
2024-02-05 01:06:37 -05:00
Simon Cruanes
d3a4dbc5b0
feat server: new notion of Upgrade handler
...
this handles `connection: upgrade` endpoints with a generic
connection-oriented handler. The main goal is to support
websockets.
2024-02-05 01:06:37 -05:00
Simon Cruanes
f416f7272d
feat IO: add Input.{of_slice,append}
2024-02-05 01:06:37 -05:00
Simon Cruanes
fd772bc023
wip: add websocket library
2024-02-05 01:06:37 -05:00
Simon Cruanes
03a2b38bad
strengthen against errors
2024-02-03 00:14:16 -05:00
Simon Cruanes
51e1d1ece5
more logging, and improved
2024-01-24 13:13:35 -05:00
Simon Cruanes
df8b579d24
feat: add Response_code.is_success
2024-01-24 13:11:47 -05:00
Simon Cruanes
ce00f7a027
prepare for 0.16
2024-01-23 23:32:52 -05:00
Simon Cruanes
bb70c46978
more detailed info string for responses
2024-01-23 23:32:21 -05:00
Simon Cruanes
178a4f9bbb
stupid bugfix
2024-01-23 23:32:21 -05:00
Simon Cruanes
729eb9c43b
info-level logging for each request
2024-01-23 23:32:21 -05:00
Simon Cruanes
86f1b9025d
add optional dependency on logs
2024-01-23 23:32:20 -05:00
Simon Cruanes
5d6edb51e9
fix: 3xx codes are not errors
2024-01-23 23:32:13 -05:00
Simon Cruanes
8c1c38f772
CI and compat with 4.8
2024-01-20 00:59:26 -05:00
Simon Cruanes
c8852b15ab
function to update GC metrics when prometheus knocks
2024-01-19 15:46:44 -05:00
Simon Cruanes
e8eeec5915
fix GC metrics
2024-01-18 23:37:16 -05:00
Simon Cruanes
7684f67bc1
add GC metrics to prometheus
2024-01-18 23:27:15 -05:00
Simon Cruanes
68c82692e1
fix
2024-01-18 22:11:35 -05:00
Simon Cruanes
c19b8dc16f
add histograms to prometheus
2024-01-18 22:05:23 -05:00
Simon Cruanes
2da3bd3fc7
compat old ocaml
2024-01-18 21:36:20 -05:00
Simon Cruanes
66ddee3522
more http handling
2024-01-18 21:34:47 -05:00
Simon Cruanes
9f9017f26a
add prometheus middleware for httpd
2024-01-18 21:25:49 -05:00
Simon Cruanes
53280ed562
basic prometheus library
2024-01-18 21:11:46 -05:00
barti2du
8d7dd43ba1
request: Make client_addr public
2023-12-19 12:29:16 -05:00
Simon Cruanes
0766f15fe2
prepare for 0.15
2023-12-05 16:11:28 -05:00
Simon Cruanes
b2b637041b
fix: do not block in accept
2023-12-04 15:45:18 -05:00
Simon Cruanes
38680e080c
improve help message for tiny-httpd-vfs-pack
2023-09-21 13:01:30 -04:00
Simon Cruanes
18780db853
security: zero out buffers from pool before reusing them
2023-08-09 16:05:36 -04:00
Simon Cruanes
925a503604
doc
2023-08-08 23:07:47 -04:00
Simon Cruanes
ac1c1ab502
prepare for 0.14
2023-08-08 16:49:19 -04:00
Simon Cruanes
d08fe6926d
rename function
2023-08-08 16:43:07 -04:00
Simon Cruanes
7365dfcdd5
doc
2023-08-08 16:37:38 -04:00
Simon Cruanes
402e3f72e4
breaking: set_top_handler takes a stream request, for more generality
2023-08-08 16:36:17 -04:00
Stéphane Lavergne
03596c1a08
Remove option around client_addr
2023-08-08 15:18:39 -04:00
Stéphane Lavergne
d5f783c159
Comment re: NEXT_RELEASE
...
Co-authored-by: Simon Cruanes <simon.cruanes.2007@m4x.org>
2023-08-08 15:00:20 -04:00
Stéphane Lavergne
188c21c70e
Merge branch 'c-cube:master' into client-ip
2023-08-08 14:52:14 -04:00
Simon Cruanes
572168967f
remove last qtest
2023-08-08 14:41:58 -04:00
Stéphane Lavergne
b36ea35703
Clarify why we do SIGINT/SIGHUP shenanigans
2023-08-08 14:30:39 -04:00
Stéphane Lavergne
def4414676
Remove window in which threads still got SIGINT/SIGHUP
...
At least on OCaml 4.13.1's runtime, signals are spooled until any thread
unblocks them, so we block them just before cloning, letting the thread
inherit the mask, then we unblock.
2023-08-08 14:30:39 -04:00
Stéphane Lavergne
d8234b0189
Don't let threads handle SIGINT/SIGHUP
...
It's common for applications to use these signals to trigger a graceful
shutdown.
2023-08-08 14:30:39 -04:00
Stéphane Lavergne
a7516689b1
Stop listening after accept loop
2023-08-08 14:30:39 -04:00
Simon Cruanes
1ca1f3dff9
fix: wait for threads to terminate when shutting down server
2023-08-08 14:30:39 -04:00
Simon Cruanes
1e50abb44f
Merge branch 'master' into client-ip
2023-08-08 13:03:40 -04:00
Simon Cruanes
25eb8b765a
rename IO.{In,Out}_channel to avoid confusion
...
these are not the standard in/out_channels so we should just use
different names.
2023-08-08 12:57:12 -04:00
Simon Cruanes
3802aad11f
remove eio stuff.
...
it doesn't really bring anything to the table for now. Let's wait until
it becomes actually useful.
2023-08-08 12:39:07 -04:00
Simon Cruanes
51b5b140a9
disable warning 48
2023-08-08 12:38:59 -04:00
Simon Cruanes
a3f5dde2f1
format
2023-08-08 12:37:19 -04:00