Skip to content

Simplify server interface

Compare
Choose a tag to compare
@avsm avsm released this 19 Dec 00:02
· 1898 commits to master since this release

Compatibility breaking interface changes:

  • Simplify the Lwt server signature, so that manual construction of
    a callback is no longer required (#210).
    Code that previous looked like:
   let conn_closed (_,conn_id) () = <...>
   let config = { Server.callback; conn_closed } in

should now be:

   let conn_closed (_,conn_id) = <...>
   let config = Server.make ~callback ~conn_closed () in
  • Remove the Cohttp.Base64 module in favour of the external base64
    library (which is now a new dependency).

New features and bug fixes:

  • Lwt respond_error now defaults to an internal server error if no
    status code is specified (#212).
  • Modernise the opam file using the OPAM 1.2 workflow (#211).
  • Flush the response body to the network by default, rather than
    buffering by default. The ?flush optional parameter can still
    be explicitly set to false if flushing is not desired (#205).