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
da7a27552a
wip: tests for prometheus
2024-01-18 21:12:18 -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
d40a0070cb
faster CI
2023-12-07 00:04:48 -05:00
Simon Cruanes
0766f15fe2
prepare for 0.15
2023-12-05 16:11:28 -05:00
Simon Cruanes
db90017ae4
chore: generate opam files from dune; require dune 2.9
2023-12-05 15:28:08 -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
Simon Cruanes
20b85c9926
Merge commit '03596c1a08f9b9fa063f22c40d80afc73d14ed08'
2023-08-08 15:39:55 -04:00
Simon Cruanes
b7eb8f56a0
fix example
2023-08-08 15:21:22 -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
5c1530f816
github CI
2023-08-08 12:57:12 -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
Stéphane Lavergne
1b7939c17a
Pass code to response makers
...
Error codes still override it.
2023-08-08 12:35:42 -04:00
Stéphane Lavergne
53182375c0
Preserve client address down to Request.t
...
Note that the argument is optional because of the Internal_ use case.
2023-08-07 16:52:32 -04:00
Simon Cruanes
b3b99af7ae
Merge pull request #68 from c-cube/wip-writer
...
introduce writer streams, use them in responses
2023-08-07 10:08:06 -04:00
Simon Cruanes
6070b36955
perf: use TCP_NODELAY for client sockets
...
(work with @vphantom)
2023-08-04 09:43:03 -04:00
Simon Cruanes
1060158192
do not flush after headers
2023-07-18 15:48:03 -04:00
Simon Cruanes
e3d8cf9fdd
server: use available buffer when writing body with chunk encoding
...
there's already a buffer nearby, we can use it to write streams/writer
bodies to the output channel
2023-07-18 15:40:56 -04:00
Simon Cruanes
098bf10466
add ?buf param to IO.Out_channel.chunk_encoding
...
If we can write individual chars to a channel, buffering becomes very
important (esp. considering that we might directly stream a HTML
document, tag by tag, into a channel). Thus it's a better default to
provide chunk encoding with a buffer.
2023-07-18 15:38:11 -04:00
Simon Cruanes
db40e291ab
buf: add add_char
2023-07-18 15:37:53 -04:00
Simon Cruanes
3280c9422f
fix: removed a \n by mistake
2023-07-18 14:36:11 -04:00
Simon Cruanes
3332fa906b
add Tiny_httpd_html.to_writer
2023-07-18 14:27:48 -04:00
Simon Cruanes
4a78eeb69c
html: ability to write a html document to an IO.Out_channel.t
2023-07-18 14:14:22 -04:00