Simon Cruanes
86f1b9025d
add optional dependency on logs
2024-01-23 23:32:20 -05:00
Simon Cruanes
38680e080c
improve help message for tiny-httpd-vfs-pack
2023-09-21 13:01:30 -04:00
Simon Cruanes
88bfb9c109
feat: Server.run takes ?after_init parameter
...
also use it in http_of_dir to print the actual port.
2023-05-24 15:38:38 -04:00
Simon Cruanes
0908d71e19
ocamlformat
2023-05-23 17:40:18 -04:00
Simon Cruanes
c8d89e24be
fix(tiny-httpd-vfs-pack): allow redirections when fetching resources
2022-04-09 22:25:58 -04:00
Simon Cruanes
02500dfb38
hardcode curly
2022-03-30 12:21:47 -04:00
Simon Cruanes
091f2f7ff2
vendor curly directly, bypass opam
2022-03-29 12:52:57 -04:00
Simon Cruanes
6a7164810b
missing option in vfs-pack
2022-03-03 22:16:50 -05:00
Simon Cruanes
2a3554c941
feat: add tiny-httpd-vfs-pack program
...
this program takes some directories, files, URLs, and produces an OCaml
module with a virtual file system containing the content of these.
This VFS can be served using Tiny_httpd_dir.
2022-03-03 22:07:35 -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
5735f813a5
restore previous behavior for http_of_dir
2021-12-20 09:59:31 -05:00
Simon Cruanes
bf2bf6832d
code cleanup
2021-12-20 09:53:45 -05:00
craff
fe0da80f2f
Documentation in Tiny_httpd_dir.mli + new dir mode IndexAndLists
2021-12-19 19:30:25 -10:00
craff
613c9ae7c3
Add a module to server static files
2021-12-17 18:55:06 -10:00
Simon Cruanes
ff5795c389
workaround for css/js in http_of_dir
2021-06-01 09:59:55 -04:00
Simon Cruanes
2a955bcbb4
feat: add rest_of_path_urlencoded and rename rest to rest_of_path
2020-11-17 10:43:05 -05:00
Simon Cruanes
9dd94b0158
fix: use the request path when redirecting to index.html
2020-11-17 09:50:47 -05:00
Simon Cruanes
39671d62e4
feat(http_of_dir): redirect to index.html if present
2020-11-17 09:43:13 -05:00
Simon Cruanes
c6d5c9a40f
fix(http_of_dir): do not url-encode paths with /
2020-11-17 09:16:46 -05:00
Simon Cruanes
b640c0da30
feat: add Route.t construct, deprecate scanf, add more structured path
...
- Request now contains a path split into components
- Request now contains the query part already transformed into an assoc list
- Route.t uses a simple GADT for mapping `/`-split paths into routes,
passing some components of type string or int to the handler
- deprecate scanf-based routing, as being too error prone
2020-05-27 19:56:23 -04:00
Simon Cruanes
7f97e75147
feat(http_of_dir): use file to guess mime type of file
2019-12-02 21:15:18 -06:00
Simon Cruanes
c16e386338
fix: read_all must return rather than blocking when done
2019-12-02 21:15:18 -06:00
Simon Cruanes
45bc589e00
feat: allow handlers to take streams
...
close #9
2019-12-02 21:15:13 -06:00
Simon Cruanes
057d6401ab
feat(bin): disable uploading by default
2019-11-26 19:23:48 -06:00
Simon Cruanes
6852912fbb
feat(bin): set charset to utf8
2019-11-26 19:07:20 -06:00
Simon Cruanes
98642811bc
feat: autodetect ipv6 address
2019-11-26 18:09:46 -06:00
Simon Cruanes
b7e458c0c4
feat: support ipv6 address
2019-11-26 18:02:18 -06:00
Simon Cruanes
61e5badf17
Merge release 0.1 back
2019-11-22 17:48:35 -06:00
Simon Cruanes
48a2d3980b
feat(bin): count number of hidden files
2019-11-22 14:40:36 -06:00
Simon Cruanes
6ddc38a7c1
feat(bin): use details for hiding hidden files by default
2019-11-22 14:33:00 -06:00
Simon Cruanes
2b95c181b8
fix: improved percent encoding of paths
2019-11-22 13:45:37 -06:00
Simon Cruanes
4aaf77b261
feat: add percent encoding/decoding
...
close #7
2019-11-22 13:36:18 -06:00
Simon Cruanes
440834ca13
feat(bin): better human-size display
2019-11-22 13:09:59 -06:00
Simon Cruanes
3824966217
feat: in http_of_dir, sort entries and display their size
2019-11-21 08:17:48 -06:00
Simon Cruanes
cac954f10a
fix(http_of_dir): handle bad symlinks
...
close #6
2019-11-19 18:27:32 -06:00
Simon Cruanes
20275c164f
improve docs and opam, tidy up for 0.1; rename stream
2019-11-18 23:18:46 -06:00
Simon Cruanes
f548041263
improve docs and opam, tidy up for 0.1
2019-11-18 23:12:33 -06:00
Simon Cruanes
3ac031b367
feat: add semaphore to limit number of simultaneous connections
2019-11-18 22:44:08 -06:00
Simon Cruanes
3048bfcc82
feat(http_of_dir): basic cache control with mtime in etag
2019-11-18 20:19:57 -06:00
Simon Cruanes
fba2af546c
feat(http_of_dir): better parsing of max-upload size
2019-11-18 19:06:12 -06:00
Simon Cruanes
8ba3c823c2
refactor API for streams, heavy bugfixing
2019-11-17 21:44:37 -06:00
Simon Cruanes
939b183a50
wip: new IO API with streams
2019-11-17 19:10:49 -06:00
Simon Cruanes
460492ded0
feat: use more precise error codes; improve http_of_dir
2019-11-17 17:36:04 -06:00
Simon Cruanes
7f68812312
feat: allow delete and use it in http_of_dir
2019-11-17 17:15:52 -06:00
Simon Cruanes
7b59670d60
feat(bin): accept PUT method for uploading up to max size
2019-11-17 16:52:42 -06:00
Simon Cruanes
3c5189a663
rename to tiny_httpd
2019-11-17 12:18:15 -06:00
Simon Cruanes
49b46b1c4e
bin: first full version of http_of_dir
2019-11-17 12:09:16 -06:00
Simon Cruanes
bca1466fe5
wip: simple binary for serving a directory
2019-11-17 11:37:59 -06:00