Skip to content

Releases: c-cube/tiny_httpd

0.17.0

20 Jun 19:34
9eb3cbf
Compare
Choose a tag to compare

CHANGES:

  • add optional middlewares to tiny_httpd_ws

  • add Head_middleware.trivial

  • add Head_middleware.t; accept it for SSE/websocket

  • add Request.pp_with which is a customizable printer

  • expose Response.Bad_req

  • use iostream for IOs

  • add a hmap-typed field to requests, to carry request specific data
    across middlewares

  • http_of_dir: ability to setup socket timeout

  • add tiny_httpd.ws, a websocket library

  • add Response_code.is_success

  • fix: No setting of sigprocmask on Windows

  • fix: give the correct code+error if protocol upgrade fails

  • remove potentially security-leaking debug line

  • fix: avoid collisions in Mime_ private module

  • fix middlewares: merge-sort per-request middleares and global ones

  • fix tiny_httpd dir: handle html files

  • perf: optim in read_line

  • perf: remove some uses of scanf in parsing

  • require iostream-camlzip >= 0.2.1

  • add optional dependency on logs

  • logs is a testdep for tiny_httpd_camlzip

0.16

24 Jan 04:33
ce00f7a
Compare
Choose a tag to compare

CHANGES:

  • feat: add Request.client_addr accessor
  • feat: add tiny_httpd.prometheus, a simple sub-library
    to expose prometheus metrics over HTTP.
  • feat: add optional dependency on logs

0.15

05 Dec 21:11
0766f15
Compare
Choose a tag to compare

CHANGES:

  • fix: do not block in accept, enabling more graceful shutdown
  • improve help message for tiny-httpd-vfs-pack
  • security: zero out buffers from pool before reusing them

0.14

08 Aug 20:53
ac1c1ab
Compare
Choose a tag to compare

CHANGES:

  • breaking: set_top_handler takes a stream request, for more generality

  • Don't let client handling threads handle SIGINT/SIGHUP

  • improve termination behavior (wait for threads to terminate when shutting down server)

  • Preserve client address down to Request.t

  • add Tiny_httpd_io module, abstraction over IOs (output/input) as better IO channels
    than the stdlib's

  • add Tiny_httpd_html.to_writer

  • add IO.Writer.t, a push based stream.

  • add Server.run_exn

  • add Tiny_httpd_pool

  • server: add IO_BACKEND abstraction; implement a unix version of it

  • perf: use TCP_NODELAY for client sockets

  • perf: use a resource pool to recycle buffers, improves memory consumption and GC pressure

0.13

30 May 14:01
ac17e61
Compare
Choose a tag to compare
  • feat: Server.run takes ?after_init parameter

  • remove dep on ounit2 and qtest

  • expose Response.make_void

  • Add OPTIONS method

  • use ocamlformat on the code

  • fix: SSE requires no body

  • fix: get addr/port from the current socket

  • fix: missing closing crlf in chunked streams

  • fix: module Html was not exposed

  • fix: close stream after Response.output

  • fix(tiny-httpd-vfs-pack): allow redirections when fetching resources

0.12

31 Mar 15:45
a78c489
Compare
Choose a tag to compare
  • add dep on seq
  • add a Html module with combinators to produce html
  • add Tiny_httpd_dir.VFS to emulate file systems
  • add a small program, tiny-httpd-vfs-pack, to pack directories and files
    (local or behind a URL) into a OCaml module using VFS
  • show small example of socket activation

0.11

05 Jan 14:38
4aade13
Compare
Choose a tag to compare
  • breaking: remove deprecated path handlers based on scanf

  • breaking: more getter/setters for request/response, change signatures,
    make request/response private aliases

  • fix: release semaphore in case of exception in accept

  • feat: add a notion of Middleware

  • feat: add ?middlewares param to create

  • feat: add ?get_time_s param to create

  • feat: close connection if response's headers contains connection

  • feat: store start_time in request

  • feat: implement connection timeout using socket options
    Default is max_keep_alive = -1.0 which preserves the original behaviour.

  • feat: in server-sent-events, add a close() function

  • refactor(zip): compression is now a middleware

  • perf: pass buf_size in many places, set default buf_size to 16kb

  • example: update echo to provide a /stats/ endpoint using a middleware

0.10

30 Nov 16:10
ff70d7d
Compare
Choose a tag to compare
  • compat with socket activation (pass a socket to the server, e.g. from systemd)
  • catch some additional exceptions in accept

0.9

18 Jul 12:02
Compare
Choose a tag to compare
0.9
  • add server side events

0.8

04 Jun 17:35
Compare
Choose a tag to compare
0.8

mostly: bugfixes and performance improvements, see https://github.com/c-cube/tiny_httpd/blob/master/CHANGES.md#08