Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 6 additions & 50 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,61 +7,11 @@
- lwt_jsoo: Forward exceptions to caller when response is null (@mefyl #738)
- Remove wrapped false (@rgrinberg #734)
- Use implicit executable dependency for generate.exe (@TheLortex #735)
- Revert the changes to adapt to conduit 3.0.0 that were briefly present in cohttp.3.0.0. We will revisit these in a future release of cohttp, but for now have chosen to preserve better compatibility with existing cohttp users. (#741, @samoht)

## v3.0.0 (2020-10-02) -- unreleased

- cohttp: update HTTP codes (@emillon #711)
- cohttp: add Uti.t to uri scheme (@brendanlong #707)
- cohttp: fix chunked encoding of empty body (@mefyl #715)
- cohttp-async: fix body not being uploaded with unchunked Async.Pipe (@mefyl #706)
- cohttp-{async, lwt}: fix suprising behaviours of Body.is_empty (@anuragsoni #714 #712 #713)
- port to conduit 3.0.0: minor breaking changes on the server API, an explicit distinction
between cohttp-lwt-unix (using tls), cohttp-lwt-notls and cohttp-lwt-ssl (using lwt_ssl),
and includes ssl in cohttp-async (@dinosaure #692)

**breaking changes**, the API to launch a server was updated and types used by the client
were updated too. A clean-recompilation of your project should be enough for users of the
client part - however, if you deeply use Conduit, you should look the release of Conduit
3.0.0 (documentation & howto) to be aware about the new usage of this library.

- [Release of Conduit 3.0.0](https://github.com/mirage/ocaml-conduit/releases/tag/v3.0.0)
- [HOW-TO use Conduit 3.0.0](https://mirage.github.io/ocaml-conduit/conduit/howto.html)
- [Documentation of Conduit 3.0.0](https://mirage.github.io/ocaml-conduit/conduit/Conduit/module-type-S/index.html)

About the server-side part of Cohttp, we broke the API according to Conduit 3.0.0. The user
must update the way to launch a Cohttp server. The technical update is about the `~mode`
argument which disappears to let 3 arguments: `cfg`, `service` and `protocol`.

This allow users to choose which kind of service they want (a TLS service or
a simple TCP service). Such values are provided by Conduit 3.0.0. For example, if
you want to launch a simple HTTP (no secure) service, you can use:
- `Conduit_{async,lwt}.TCP.service`
- `Conduit_{async,lwt}.TCP.protocol`

The encryption layer can be provided by `Conduit_{async,lwt}_{tls,ssl}.TCP` module (`tls` means
an usage of `ocaml-tls`, `ssl` means a usage of OpenSSL). Then, the `cfg` value depends on the
`service` value. For example, for `Conduit_lwt.TCP.service`, `cfg = Conduit_lwt.TCP.configuration`.
On this way, the user is able to launch a HTTP server with:
```ocaml
let cfg =
{ Conduit_lwt.TCP.sockaddr= Unix.ADDR_INET (Unix.inet_addr_loopback, 8080)
; capacity= 40 }

let run cohttp_config =
Cohttp_lwt_unix.Server.create cfg Conduit_lwt.TCP.protocol Conduit_lwt.TCP.service
cohttp_config
```

Of course, [the documentation](https://mirage.github.io/ocaml-cohttp/cohttp-lwt-unix-nossl/Cohttp_lwt_unix_nossl/Server/index.html)
was updated according this new interface. More details can be found into Conduit 3.0.0
too about encryption services.

Finally, an other **breaking change** is about the TLS stack used by `cohttp-lwt-unix`
on the client side. In **anyway**, `cohttp-lwt-unix` uses `ocaml-tls` to handle TLS. To
explicitely use OpenSSL, users will need to depend ong `cohttp-lwt-unix-ssl` instead. If they
do not want to use the encryption layer, they now need to use `cohttp-lwt-unix-nossl`.

- cohttp-lwt-jsoo: rename Cohttp_lwt_xhr to Cohttp_lwt_jsoo for consistency (@mseri #717)
- refactoring of tests (@mseri #709, @dinosaure #692)
- update documentation (@dinosaure #716, @mseri #720)
Expand All @@ -72,6 +22,12 @@
- cohttp-lwt: partly inline read_response, fix body stream leak (@madroach @dinosaure #696)
- improve media type parsing (@seliopou #542, @dinosaure #725)
- add comparison functions for Request.t and Response.t via ppx_compare (@msaffer-js @dinosaure #686)
- [reverted] breaking changes to client and server API to use conduit
3.0.0 (@dinosaure #692). However, as the design discussion did not reach
consensus, these changes were reverted to preserve better compatibility with
existing cohttp users. (#741, @samoht)

## v3.0.0 - aborted
Comment thread
mseri marked this conversation as resolved.

## v2.5.5 (2021-03-15)

Expand Down