Simon Cruanes
04be73ee00
refactor the rest
2024-02-26 13:55:20 -05:00
Simon Cruanes
5018df5ff8
fix: avoid collisions in Mime_ private module
2024-02-22 18:33:57 -05:00
Simon Cruanes
225c21b4cc
error handling, and bugfix (idempotent closing of Unix.fd)
2024-02-22 18:23:18 -05:00
Simon Cruanes
e69f1b7c8c
feat dir: only read content of regular files
...
no need to look into sockets, pipes, etc.
2024-02-21 22:06:24 -05:00
Simon Cruanes
d9b3731207
feat: optional dep on magic-mime for http_of_dir
2024-02-21 22:03:31 -05:00
Simon Cruanes
0d1bccfd1b
better logging, do not error on close
2024-02-18 23:44:10 -05:00
Simon Cruanes
86f1b9025d
add optional dependency on logs
2024-01-23 23:32:20 -05:00
Simon Cruanes
163d720641
Merge branch 'ocamlformat'
2023-05-24 15:41:58 -04:00
Simon Cruanes
61ee931b6c
fix warnings
2023-05-24 15:03:32 -04:00
Simon Cruanes
0908d71e19
ocamlformat
2023-05-23 17:40:18 -04:00
Simon Cruanes
997f7aa868
expose Response.make_void
...
it only has no body if the http code is compatible with it.
close #62
2023-05-23 17:18:05 -04:00
craff
462fbd661c
use of_fd instead of_chan everywhere
2022-12-09 03:26:44 -10:00
Christophe Raffalli
b52407ea00
Index seems not to work wirg non empty prefix
...
Here is a proposed fix ?
2022-12-04 14:10:56 -05:00
Simon Cruanes
4aba0654b0
change api for Html.nary'; better newlines in output
2022-03-18 21:32:11 -04:00
Simon Cruanes
8f32b67a03
factor code generation; fix bug in dir/
2022-03-17 23:02:01 -04:00
Simon Cruanes
d5c828978d
fixes in dir module
2022-03-17 22:42:36 -04:00
Simon Cruanes
efb653a2d6
refactor(dir): use Html module to list directory content
2022-03-17 22:34:10 -04:00
Simon Cruanes
d5f9eacc81
split code into more modules
2022-03-16 20:40:38 -04:00
Simon Cruanes
fd305b6173
detail
2022-03-03 22:20:15 -05:00
Simon Cruanes
8aff791a27
feat: full VFS and embedded FS implementations
2022-03-03 22:07:08 -05:00
Simon Cruanes
10ade90dfd
wip
2022-03-01 16:59:23 -05:00
Simon Cruanes
0078d91672
feat: add Tiny_httpd_dir.VFS to emulate file systems
...
the idea is to be able to serve static content from anything that looks
like a file system, not just a directory. That could be a sqlite
table, or a OCaml file with embedded content, etc.
2022-03-01 16:53:22 -05:00
Simon Cruanes
cdd7df29ac
prevent Tiny_httpd_dir.config from being built by hand; provide builder
2022-03-01 16:24:40 -05:00
Simon Cruanes
bf2bf6832d
code cleanup
2021-12-20 09:53:45 -05:00
Simon Cruanes
e1ddb96e7c
Update src/Tiny_httpd_dir.ml
2021-12-20 09:52:23 -05:00
Simon Cruanes
ce4b5f0a11
some small code improvements
2021-12-20 09:49:44 -05:00
craff
fe0da80f2f
Documentation in Tiny_httpd_dir.mli + new dir mode IndexAndLists
2021-12-19 19:30:25 -10:00
craff
7e236058f7
remove mem cache ... not really usefull to gain speed
2021-12-19 00:58:03 -10:00
craff
6dceabdd6c
Revert "use bigstring and map_file"
...
This reverts commit 3067120539 .
2021-12-19 00:54:17 -10:00
craff
f08406c1ae
Revert "close fd correctly"
...
This reverts commit 912c7b1fd7 .
2021-12-19 00:53:54 -10:00
craff
912c7b1fd7
close fd correctly
2021-12-19 00:49:09 -10:00
craff
3067120539
use bigstring and map_file
2021-12-19 00:29:56 -10:00
craff
0a31d09601
added mem_cache
2021-12-17 22:13:31 -10:00
craff
613c9ae7c3
Add a module to server static files
2021-12-17 18:55:06 -10:00