Commit graph

259 commits

Author SHA1 Message Date
Simon Cruanes
aa66e172e8 feat: printing routes 2020-08-04 19:16:15 -04:00
Simon Cruanes
a679ddf1d1 style 2020-08-03 21:40:42 -04:00
Simon Cruanes
13dca59afd fix doc 2020-05-28 21:23:10 -04:00
Simon Cruanes
3ac5510e2d prepare for 0.6 2020-05-28 21:20:09 -04:00
Simon Cruanes
80a4dc3c50 doc: update readme 2020-05-28 21:20:09 -04:00
Simon Cruanes
6e54ee69b5 fix: avoid spamming response 2020-05-27 22:30:50 -04:00
Simon Cruanes
6d01b5347e fix: do not output a content-length for a chunked response 2020-05-27 22:25:13 -04:00
Simon Cruanes
fdd97744e0 feat: use chunked encoding for large string responses, too 2020-05-27 22:16:36 -04:00
Simon Cruanes
020dd056ac fix(zip) 2020-05-27 21:40:38 -04:00
Simon Cruanes
bbe8d1c504 refactor(echo): simplify code, use gzip aggressively 2020-05-27 21:40:20 -04:00
Simon Cruanes
4f730ec7b6 fix: set transfer-encoding header when returning a chunked stream 2020-05-27 21:39:43 -04:00
Simon Cruanes
4a83a2f07f fix(zip): handle case where camlzip consumes 0 bytes 2020-05-27 21:27:25 -04:00
Simon Cruanes
4300e8dcf0 feat(gzip): also compress string responses if they're big 2020-05-27 20:29:55 -04: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
eaa2c9b3b7 accept http1.0 2020-05-27 13:23:02 -04:00
Simon Cruanes
5c56cb7f1e debug msg 2020-05-27 13:11:32 -04:00
Simon Cruanes
1d309abca6 prepare for 0.5 2020-03-25 23:26:03 -04:00
Simon Cruanes
4023a5ab79 fix: use content-encoding: deflate when returning compressed content
the RFCs don't mandate it but it seems like chrome and firefox only
understand that.
2020-03-25 23:23:06 -04:00
Simon Cruanes
64df8616f9 style: fix example 2020-03-25 23:23:06 -04:00
Simon Cruanes
53cf1fbde0 chore: update opam version, try to fix CI 2020-03-25 23:23:06 -04:00
Simon Cruanes
ab90f09e2c small fix 2020-03-25 23:23:06 -04:00
Simon Cruanes
e8ed0afe47 fix: parse transfer-encoding properly 2020-03-25 23:23:06 -04:00
Simon Cruanes
65f8f957bd example: update echo so it can use camlzip, and serves files 2020-03-25 23:23:06 -04:00
Simon Cruanes
9d6f4d25cf fix(camlzip): proper handling of transfer-encoding for deflate 2020-03-25 23:23:06 -04:00
Simon Cruanes
2435e33df4 feat: expose Headers.empty 2020-03-25 23:23:06 -04:00
Simon Cruanes
a238a2100b rename into tiny_httpd_camlzip 2020-03-25 23:23:06 -04:00
Simon Cruanes
8131c07425 wip: zlib 2020-03-25 23:23:06 -04:00
Simon Cruanes
c2fb67615d refactor zlib 2020-03-25 23:23:06 -04:00
Simon Cruanes
e6b46379c0 wip(zlib): implement decode/encode wrappers 2020-03-25 23:23:06 -04:00
Simon Cruanes
59829264a5 wip: zlib bridge library 2020-03-25 23:23:06 -04:00
Simon Cruanes
f8a5968984 fix: use the non-query path for routing 2020-02-26 19:55:49 -06:00
Simon Cruanes
bdd2fd8160 feat(util): add some query related utils 2020-02-26 19:55:37 -06:00
Simon Cruanes
995aee8489 prepare for 0.4 2020-02-08 09:38:50 -06:00
Simon Cruanes
b3f254446d strip whitespace 2020-02-08 09:37:12 -06:00
Simon Cruanes
d25cadfa27 doc: fix url 2020-01-29 11:15:54 -06:00
Simon Cruanes
0f77a120d2 chore: add github action 2020-01-29 10:49:28 -06:00
Simon Cruanes
130608d924 feat: easy accessor to the query parameters in path 2019-12-09 14:28:57 -06:00
Anurag Soni
057d5c9f0c header field names are case insensitive
Reference: https://tools.ietf.org/html/rfc2616#section-4.2
2019-12-09 09:42:56 -06:00
Simon Cruanes
ee1b597876 doc: add note on jemalloc in the readme 2019-12-05 23:41:30 -06:00
Simon Cruanes
aa35e324e6 refactor 2019-12-03 17:38:56 -06:00
Simon Cruanes
948b5e6389 test: add a unit test for parsing http req 2019-12-03 17:32:12 -06:00
Simon Cruanes
de7acbaf6d refactor: logerror when closing client socket 2019-12-03 17:19:41 -06:00
Simon Cruanes
1fc544aa16 refactor: improve the echo server 2019-12-03 16:20:05 -06:00
Simon Cruanes
17a26ea297 doc: add readme 2019-12-03 09:49:52 -06:00
Simon Cruanes
5b8d2bf88c doc: add a changelog 2019-12-03 08:38:36 -06:00
Simon Cruanes
21e0c18069 prepare for 0.3 2019-12-02 21:19:19 -06: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
8d33f84022 fix: missing crlf between chunks 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
51519fec1f fix: proper amortized O(1) push in Buf.push 2019-12-02 21:15:18 -06:00