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
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
2435e33df4
feat: expose Headers.empty
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
b3f254446d
strip whitespace
2020-02-08 09:37:12 -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
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
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
Simon Cruanes
45bc589e00
feat: allow handlers to take streams
...
close #9
2019-12-02 21:15:13 -06:00
Simon Cruanes
6af39da3a6
tweak debug messages
2019-11-27 16:23:25 -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
20275c164f
improve docs and opam, tidy up for 0.1; rename stream
2019-11-18 23:18:46 -06:00
Simon Cruanes
8bfcf3673a
feat: add host field to request
2019-11-18 23:04:23 -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
506292c587
fix: break properly on empty read in Stream_.read_line
2019-11-18 19:49:06 -06:00
Simon Cruanes
9c84f95e12
feat: simplify type of streams
2019-11-18 19:06:12 -06:00
Simon Cruanes
e75e97a559
fix: remove debug msg
2019-11-18 19:06:12 -06:00
Simon Cruanes
3245647dc9
improve API for tiny_httpd
2019-11-18 19:06:12 -06:00
Simon Cruanes
989971bb04
feat: use rust-like streams, much better
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
76408b7e39
wip: IO streams
2019-11-17 17:40:26 -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
193a9d9d31
change API with accept pre-filter, use these before 100-continue
2019-11-17 16:52:39 -06:00
Simon Cruanes
3c5189a663
rename to tiny_httpd
2019-11-17 12:18:15 -06:00