deploy: 17edc1c46e0ad44575354914ae7abc1c1ff13819

This commit is contained in:
c-cube 2025-04-17 20:35:36 +00:00
parent 4f489f07b8
commit cd933e033b
15 changed files with 65 additions and 19 deletions

View file

@ -1,2 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>In (iostream.Iostream_unix.In)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../index.html">Index</a> &#x00BB; <a href="../../index.html">iostream</a> &#x00BB; <a href="../index.html">Iostream_unix</a> &#x00BB; In</nav><header class="odoc-preamble"><h1>Module <code><span>Iostream_unix.In</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-of_unix_fd"><a href="#val-of_unix_fd" class="anchor"></a><code><span><span class="keyword">val</span> of_unix_fd : <span><span class="optlabel">?close_noerr</span>:bool <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../ocaml/Unix/index.html#type-file_descr">Unix.file_descr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../Iostream/In/class-type-t_seekable/index.html">Iostream.In.t_seekable</a></span></code></div><div class="spec-doc"><p>Create an in stream from a raw Unix file descriptor. The file descriptor must be opened for reading.</p></div></div></div></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>In (iostream.Iostream_unix.In)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../index.html">Index</a> &#x00BB; <a href="../../index.html">iostream</a> &#x00BB; <a href="../index.html">Iostream_unix</a> &#x00BB; In</nav><header class="odoc-preamble"><h1>Module <code><span>Iostream_unix.In</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-of_unix_fd"><a href="#val-of_unix_fd" class="anchor"></a><code><span><span class="keyword">val</span> of_unix_fd : <span><span class="optlabel">?close_noerr</span>:bool <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">Unix</span>.file_descr <span class="arrow">&#45;&gt;</span></span> <a href="../../Iostream/In/class-type-t_seekable/index.html">Iostream.In.t_seekable</a></span></code></div><div class="spec-doc"><p>Create an in stream from a raw Unix file descriptor. The file descriptor must be opened for reading.</p></div></div></div></body></html>

View file

@ -1,2 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Out (iostream.Iostream_unix.Out)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../index.html">Index</a> &#x00BB; <a href="../../index.html">iostream</a> &#x00BB; <a href="../index.html">Iostream_unix</a> &#x00BB; Out</nav><header class="odoc-preamble"><h1>Module <code><span>Iostream_unix.Out</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-of_unix_fd"><a href="#val-of_unix_fd" class="anchor"></a><code><span><span class="keyword">val</span> of_unix_fd : <span><a href="../../../ocaml/Unix/index.html#type-file_descr">Unix.file_descr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../Iostream/Out/class-type-t_seekable/index.html">Iostream.Out.t_seekable</a></span></code></div><div class="spec-doc"><p>Output stream directly writing into the given Unix file descriptor.</p></div></div></div></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Out (iostream.Iostream_unix.Out)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../index.html">Index</a> &#x00BB; <a href="../../index.html">iostream</a> &#x00BB; <a href="../index.html">Iostream_unix</a> &#x00BB; Out</nav><header class="odoc-preamble"><h1>Module <code><span>Iostream_unix.Out</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-of_unix_fd"><a href="#val-of_unix_fd" class="anchor"></a><code><span><span class="keyword">val</span> of_unix_fd : <span><span class="xref-unresolved">Unix</span>.file_descr <span class="arrow">&#45;&gt;</span></span> <a href="../../Iostream/Out/class-type-t_seekable/index.html">Iostream.Out.t_seekable</a></span></code></div><div class="spec-doc"><p>Output stream directly writing into the given Unix file descriptor.</p></div></div></div></body></html>

File diff suppressed because one or more lines are too long

View file

@ -127,7 +127,7 @@ echo:
<span><span class="optlabel">?new_thread</span>:<span>(<span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> unit)</span> <span class="arrow">&#45;&gt;</span></span> unit)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?addr</span>:string <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?port</span>:int <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?sock</span>:<a href="../../ocaml/Unix/index.html#type-file_descr">Unix.file_descr</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?sock</span>:<span class="xref-unresolved">Unix</span>.file_descr <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?head_middlewares</span>:<span><a href="../Tiny_httpd_core/Server/Head_middleware/index.html#type-t">Head_middleware.t</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?middlewares</span>:<span><span>(<span>[ `Encoding <span><span>| `Stage</span> of int</span> ]</span> * <a href="../Tiny_httpd_core/Server/Middleware/index.html#type-t">Middleware.t</a>)</span> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Raw (tiny_httpd.Tiny_httpd_core.Pool.Raw)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../../index.html">Index</a> &#x00BB; <a href="../../../index.html">tiny_httpd</a> &#x00BB; <a href="../../index.html">Tiny_httpd_core</a> &#x00BB; <a href="../index.html">Pool</a> &#x00BB; Raw</nav><header class="odoc-preamble"><h1>Module <code><span>Pool.Raw</span></code></h1><p>Low level control over the pool. This is easier to get wrong (e.g. releasing the same resource twice) so use with caution.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> NEXT_RELEASE</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-acquire"><a href="#val-acquire" class="anchor"></a><code><span><span class="keyword">val</span> acquire : <span><span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-release"><a href="#val-release" class="anchor"></a><code><span><span class="keyword">val</span> release : <span><span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div></div></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Raw (tiny_httpd.Tiny_httpd_core.Pool.Raw)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../../index.html">Index</a> &#x00BB; <a href="../../../index.html">tiny_httpd</a> &#x00BB; <a href="../../index.html">Tiny_httpd_core</a> &#x00BB; <a href="../index.html">Pool</a> &#x00BB; Raw</nav><header class="odoc-preamble"><h1>Module <code><span>Pool.Raw</span></code></h1><p>Low level control over the pool. This is easier to get wrong (e.g. releasing the same resource twice) so use with caution.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.18</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-acquire"><a href="#val-acquire" class="anchor"></a><code><span><span class="keyword">val</span> acquire : <span><span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-release"><a href="#val-release" class="anchor"></a><code><span><span class="keyword">val</span> release : <span><span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div></div></body></html>

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO_BACKEND (tiny_httpd.Tiny_httpd_core.Server.IO_BACKEND)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../../index.html">Index</a> &#x00BB; <a href="../../../index.html">tiny_httpd</a> &#x00BB; <a href="../../index.html">Tiny_httpd_core</a> &#x00BB; <a href="../index.html">Server</a> &#x00BB; IO_BACKEND</nav><header class="odoc-preamble"><h1>Module type <code><span>Server.IO_BACKEND</span></code></h1><p>A backend that provides IO operations, network operations, etc.</p><p>This is used to decouple tiny_httpd from the scheduler/IO library used to actually open a TCP server and talk to clients. The classic way is based on <a href="../../../../ocaml/Unix/index.html"><code>Unix</code></a> and blocking IOs, but it's also possible to use an OCaml 5 library using effects and non blocking IOs.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-init_addr"><a href="#val-init_addr" class="anchor"></a><code><span><span class="keyword">val</span> init_addr : <span>unit <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p>Initial TCP address</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-init_port"><a href="#val-init_port" class="anchor"></a><code><span><span class="keyword">val</span> init_port : <span>unit <span class="arrow">&#45;&gt;</span></span> int</span></code></div><div class="spec-doc"><p>Initial port</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_time_s"><a href="#val-get_time_s" class="anchor"></a><code><span><span class="keyword">val</span> get_time_s : <span>unit <span class="arrow">&#45;&gt;</span></span> float</span></code></div><div class="spec-doc"><p>Obtain the current timestamp in seconds.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-tcp_server"><a href="#val-tcp_server" class="anchor"></a><code><span><span class="keyword">val</span> tcp_server : <span>unit <span class="arrow">&#45;&gt;</span></span> <a href="../../IO/TCP_server/index.html#type-builder">IO.TCP_server.builder</a></span></code></div><div class="spec-doc"><p>TCP server builder, to create servers that can listen on a port and handle clients.</p></div></div></div></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO_BACKEND (tiny_httpd.Tiny_httpd_core.Server.IO_BACKEND)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../../index.html">Index</a> &#x00BB; <a href="../../../index.html">tiny_httpd</a> &#x00BB; <a href="../../index.html">Tiny_httpd_core</a> &#x00BB; <a href="../index.html">Server</a> &#x00BB; IO_BACKEND</nav><header class="odoc-preamble"><h1>Module type <code><span>Server.IO_BACKEND</span></code></h1><p>A backend that provides IO operations, network operations, etc.</p><p>This is used to decouple tiny_httpd from the scheduler/IO library used to actually open a TCP server and talk to clients. The classic way is based on <code>Unix</code> and blocking IOs, but it's also possible to use an OCaml 5 library using effects and non blocking IOs.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-init_addr"><a href="#val-init_addr" class="anchor"></a><code><span><span class="keyword">val</span> init_addr : <span>unit <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p>Initial TCP address</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-init_port"><a href="#val-init_port" class="anchor"></a><code><span><span class="keyword">val</span> init_port : <span>unit <span class="arrow">&#45;&gt;</span></span> int</span></code></div><div class="spec-doc"><p>Initial port</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_time_s"><a href="#val-get_time_s" class="anchor"></a><code><span><span class="keyword">val</span> get_time_s : <span>unit <span class="arrow">&#45;&gt;</span></span> float</span></code></div><div class="spec-doc"><p>Obtain the current timestamp in seconds.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-tcp_server"><a href="#val-tcp_server" class="anchor"></a><code><span><span class="keyword">val</span> tcp_server : <span>unit <span class="arrow">&#45;&gt;</span></span> <a href="../../IO/TCP_server/index.html#type-builder">IO.TCP_server.builder</a></span></code></div><div class="spec-doc"><p>TCP server builder, to create servers that can listen on a port and handle clients.</p></div></div></div></body></html>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>UPGRADE_HANDLER (tiny_httpd.Tiny_httpd_core.Server.UPGRADE_HANDLER)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../../index.html">Index</a> &#x00BB; <a href="../../../index.html">tiny_httpd</a> &#x00BB; <a href="../../index.html">Tiny_httpd_core</a> &#x00BB; <a href="../index.html">Server</a> &#x00BB; UPGRADE_HANDLER</nav><header class="odoc-preamble"><h1>Module type <code><span>Server.UPGRADE_HANDLER</span></code></h1><p>Handler that upgrades to another protocol.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.17</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-handshake_state"><a href="#type-handshake_state" class="anchor"></a><code><span><span class="keyword">type</span> handshake_state</span></code></div><div class="spec-doc"><p>Some specific state returned after handshake</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-name"><a href="#val-name" class="anchor"></a><code><span><span class="keyword">val</span> name : string</span></code></div><div class="spec-doc"><p>Name in the &quot;upgrade&quot; header</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-handshake"><a href="#val-handshake" class="anchor"></a><code><span><span class="keyword">val</span> handshake :
<span><a href="../../../../ocaml/Unix/index.html#type-sockaddr">Unix.sockaddr</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="xref-unresolved">Unix</span>.sockaddr <span class="arrow">&#45;&gt;</span></span>
<span><span>unit <a href="../../Request/index.html#type-t">Request.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<a href="../../Headers/index.html#type-t">Headers.t</a> * <a href="#type-handshake_state">handshake_state</a>, string)</span> <a href="../../../../ocaml/Stdlib/index.html#type-result">result</a></span></span></code></div><div class="spec-doc"><p>Perform the handshake and upgrade the connection. This returns either <code>Ok (resp_headers, state)</code> in case of success, in which case the server sends a <code>101</code> response with <code>resp_headers</code>; or it returns <code>Error log_msg</code> if the the handshake fails, in which case the connection is closed without further ado and <code>log_msg</code> is logged locally (but not returned to the client).</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-handle_connection"><a href="#val-handle_connection" class="anchor"></a><code><span><span class="keyword">val</span> handle_connection : <span><a href="#type-handshake_state">handshake_state</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../IO/Input/class-type-t/index.html">IO.Input.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../IO/Output/class-type-t/index.html">IO.Output.t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Take control of the connection and take it from ther.e</p></div></div></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,23 @@
## 0.19
- feat(headers): `set` will not reallocate whole list if not needed
- feat(headers): use case insensitive comparison
- fix(response): do not override "content-length" in raw response
- feat pool: expose `acquire/release` for advanced uses
## 0.18
- feat: add ?head_middlewares to `create`
- add content-type header for prometheus endpoint
- new flag ?enable_logging to disable regular logs (not debug)
- new sublibrary to deal with multipart-form-data
- feat response: add `pp_with`; have `pp` hide set-cookie headers
- fix percent encoding for < 0x10 chars
- Processing to fix incompatible -O and gcc flags
- fix: make check for 'Connection: Upgrade' header case-insensitive
## 0.17
- add optional middlewares to tiny_httpd_ws

View file

@ -1,4 +1,23 @@
## 0.19
- feat(headers): `set` will not reallocate whole list if not needed
- feat(headers): use case insensitive comparison
- fix(response): do not override "content-length" in raw response
- feat pool: expose `acquire/release` for advanced uses
## 0.18
- feat: add ?head_middlewares to `create`
- add content-type header for prometheus endpoint
- new flag ?enable_logging to disable regular logs (not debug)
- new sublibrary to deal with multipart-form-data
- feat response: add `pp_with`; have `pp` hide set-cookie headers
- fix percent encoding for < 0x10 chars
- Processing to fix incompatible -O and gcc flags
- fix: make check for 'Connection: Upgrade' header case-insensitive
## 0.17
- add optional middlewares to tiny_httpd_ws