this repo has no description

[new release] cohttp, cohttp-top, cohttp-mirage, cohttp-lwt, cohttp-lwt-unix, cohttp-lwt-jsoo and cohttp-async (5.0.0)

CHANGES:

- Cohttp.Header: new implementation (lyrm mirage/ocaml-cohttp#747)

+ New implementation of Header modules using an associative list instead of a map, with one major semantic change (function ```get```, see below), and some new functions (```clean_dup```, ```get_multi_concat```)
+ More Alcotest tests as well as fuzzing tests for this particular module.

### Purpose

The new header implementation uses an associative list instead of a map to represent headers and is focused on predictability and intuitivity: except for some specific and documented functions, the headers are always kept in transmission order, which makes debugging easier and is also important for [RFC7230§3.2.2](https://tools.ietf.org/html/rfc7230#section-3.2.2) that states that multiple values of a header must be kept in order.

Also, to get an intuitive function behaviour, no extra work to enforce RFCs is done by the basic functions. For example, RFC7230§3.2.2 requires that a sender does not send multiple values for a non list-value header. This particular rule could require the ```Header.add``` function to remove previous values of non-list-value headers, which means some changes of the headers would be out of control of the user. With the current implementation, an user has to actively call dedicated functions to enforce such RFCs (here ```Header.clean_dup```).

### Semantic changes
Two functions have a semantic change : ```get``` and ```update```.

#### get
```get``` was previously doing more than just returns the value associated to a key; it was also checking if the searched header could have multiple values: if not, the last value associated to the header was returned; otherwise, all the associated values were concatenated and returned. This semantics does not match the global idea behind the new header implementation, and would also be very inefficient.

+ The new ```get``` function only returns the last value associated to the searched header.
+ ```get_multi_concat``` function has been added to get a result similar to the previous ```get``` function.

#### update
```update``` is a pretty new function (mirage/ocaml-cohttp#703) and changes are minor and related to ```get``` semantic changes.

+ ```update h k f``` is now modifying only the last occurrences of the header ```k``` instead of all its occurrences.
+ a new function ```update_all``` function has been added and work on all the occurrences of the updated header.

### New functions :

+ ```clean_dup``` enables the user to clean headers that follows the {{:https://tools.ietf.org/html/rfc7230#section-3.2.2} RFC7230§3.2.2} (no duplicate, except ```set-cookie```)
+ ```get_multi_concat``` has been added to get a result similar to the previous ```get``` function.

- Cohttp.Header: performance improvement (mseri, anuragsoni mirage/ocaml-cohttp#778)
**Breaking** the headers are no-longer lowercased when parsed, the headers key comparison is case insensitive instead.

- cohttp-lwt-unix: Adopt ocaml-conduit 5.0.0 (smorimoto mirage/ocaml-cohttp#787)
**Breaking** `Conduit_lwt_unix.connect`'s `ctx` param type chaged from `ctx` to `ctx Lazy.t`

- cohttp-mirage: fix deprecated fmt usage (tmcgilchrist mirage/ocaml-cohttp#783)
- lwt_jsoo: Use logs for the warnings and document it (mseri mirage/ocaml-cohttp#776)
- lwt: Use logs to warn users about leaked bodies and document it (mseri mirage/ocaml-cohttp#771)
- lwt, lwt_unix: Improve use of logs and the documentation, fix bug in the Debug.enable_debug function (mseri mirage/ocaml-cohttp#772)
- lwt_jsoo: Fix exception on connection errors in chrome (mefyl mirage/ocaml-cohttp#761)
- lwt_jsoo: Fix `Lwt.wakeup_exn` `Invalid_arg` exception when a js
stack overflow happens in the XHR completion handler (mefyl mirage/ocaml-cohttp#762).
- lwt_jsoo: Add test suite (mefyl mirage/ocaml-cohttp#764).

Changed files
+375
packages
cohttp
cohttp.5.0.0
cohttp-async
cohttp-async.5.0.0
cohttp-lwt
cohttp-lwt.5.0.0
cohttp-lwt-jsoo
cohttp-lwt-jsoo.5.0.0
cohttp-lwt-unix
cohttp-lwt-unix.5.0.0
cohttp-mirage
cohttp-mirage.5.0.0
cohttp-top
cohttp-top.5.0.0
+62
packages/cohttp-async/cohttp-async.5.0.0/opam
···
+
opam-version: "2.0"
+
maintainer: "anil@recoil.org"
+
authors: [
+
"Anil Madhavapeddy"
+
"Stefano Zacchiroli"
+
"David Sheets"
+
"Thomas Gazagnaire"
+
"David Scott"
+
"Rudi Grinberg"
+
"Andy Ray"
+
]
+
synopsis: "CoHTTP implementation for the Async concurrency library"
+
description: """
+
An implementation of an HTTP client and server using the Async
+
concurrency library. See the `Cohttp_async` module for information
+
on how to use this. The package also installs `cohttp-curl-async`
+
and a `cohttp-server-async` binaries for quick uses of a HTTP(S)
+
client and server respectively.
+
"""
+
license: "ISC"
+
tags: ["org:mirage" "org:xapi-project"]
+
homepage: "https://github.com/mirage/ocaml-cohttp"
+
doc: "https://mirage.github.io/ocaml-cohttp/"
+
bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
+
depends: [
+
"ocaml" {>= "4.08"}
+
"dune" {>= "2.0"}
+
"async_kernel" {>= "v0.14.0"}
+
"async_unix" {>= "v0.14.0"}
+
"async" {>= "v0.14.0"}
+
"base" {>= "v0.11.0"}
+
"core" {with-test}
+
"core_unix" {>= "v0.14.0"}
+
"cohttp" {= version}
+
"conduit-async" {>= "1.2.0"}
+
"magic-mime"
+
"mirage-crypto" {with-test}
+
"logs"
+
"fmt" {>= "0.8.2"}
+
"sexplib0"
+
"ppx_sexp_conv" {>= "v0.13.0"}
+
"ounit" {with-test}
+
"uri" {>= "2.0.0"}
+
"uri-sexp"
+
"ipaddr"
+
]
+
build: [
+
["dune" "subst"] {dev}
+
["dune" "build" "-p" name "-j" jobs]
+
["dune" "runtest" "-p" name "-j" jobs] {with-test}
+
]
+
available: arch != "s390x"
+
dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git"
+
url {
+
src:
+
"https://github.com/mirage/ocaml-cohttp/releases/download/v5.0.0/cohttp-5.0.0.tbz"
+
checksum: [
+
"sha256=fd6ff4b86c818355d61b3a08628596dbf517d6a7da6e8edec481bb0653ca5a05"
+
"sha512=f0bfd715806965af5488010cc9388d05406b67ece0b2cb8f7803553b17a5264d03094e59127a62d37c0d6c0e74d4717e643737c43d9bcfb10b112a73d5f49c4d"
+
]
+
}
+
x-commit-hash: "5f9c0ae88a69e4280810fe73344367e90954dea5"
+51
packages/cohttp-lwt-jsoo/cohttp-lwt-jsoo.5.0.0/opam
···
+
opam-version: "2.0"
+
maintainer: "anil@recoil.org"
+
authors: [
+
"Anil Madhavapeddy"
+
"Stefano Zacchiroli"
+
"David Sheets"
+
"Thomas Gazagnaire"
+
"David Scott"
+
"Rudi Grinberg"
+
"Andy Ray"
+
]
+
synopsis: "CoHTTP implementation for the Js_of_ocaml JavaScript compiler"
+
description: """
+
An implementation of an HTTP client for JavaScript, but using the
+
CoHTTP types. This lets you build HTTP clients that can compile
+
natively (using one of the other Cohttp backends such as `cohttp-lwt-unix`)
+
and also to native JavaScript via js_of_ocaml.
+
"""
+
license: "ISC"
+
tags: ["org:mirage" "org:xapi-project"]
+
homepage: "https://github.com/mirage/ocaml-cohttp"
+
doc: "https://mirage.github.io/ocaml-cohttp/"
+
bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
+
depends: [
+
"ocaml" {>= "4.08"}
+
"dune" {>= "2.0"}
+
"cohttp" {= version}
+
"cohttp-lwt" {= version}
+
"logs"
+
"lwt" {>= "3.0.0"}
+
"lwt_ppx" {with-test}
+
"conf-npm" {with-test}
+
"js_of_ocaml" {>= "3.3.0"}
+
"js_of_ocaml-ppx" {>= "3.3.0"}
+
"js_of_ocaml-lwt" {>= "3.5.0"}
+
]
+
build: [
+
["dune" "subst"] {dev}
+
["dune" "build" "-p" name "-j" jobs]
+
["dune" "runtest" "-p" name "-j" jobs] {with-test}
+
]
+
dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git"
+
url {
+
src:
+
"https://github.com/mirage/ocaml-cohttp/releases/download/v5.0.0/cohttp-5.0.0.tbz"
+
checksum: [
+
"sha256=fd6ff4b86c818355d61b3a08628596dbf517d6a7da6e8edec481bb0653ca5a05"
+
"sha512=f0bfd715806965af5488010cc9388d05406b67ece0b2cb8f7803553b17a5264d03094e59127a62d37c0d6c0e74d4717e643737c43d9bcfb10b112a73d5f49c4d"
+
]
+
}
+
x-commit-hash: "5f9c0ae88a69e4280810fe73344367e90954dea5"
+56
packages/cohttp-lwt-unix/cohttp-lwt-unix.5.0.0/opam
···
+
opam-version: "2.0"
+
maintainer: "anil@recoil.org"
+
authors: [
+
"Anil Madhavapeddy"
+
"Stefano Zacchiroli"
+
"David Sheets"
+
"Thomas Gazagnaire"
+
"David Scott"
+
"Rudi Grinberg"
+
"Andy Ray"
+
]
+
synopsis: "CoHTTP implementation for Unix and Windows using Lwt"
+
description: """
+
An implementation of an HTTP client and server using the Lwt
+
concurrency library. See the `Cohttp_lwt_unix` module for information
+
on how to use this. The package also installs `cohttp-curl-lwt`
+
and a `cohttp-server-lwt` binaries for quick uses of a HTTP(S)
+
client and server respectively.
+
+
Although the name implies that this only works under Unix, it
+
should also be fine under Windows too."""
+
license: "ISC"
+
tags: ["org:mirage" "org:xapi-project"]
+
homepage: "https://github.com/mirage/ocaml-cohttp"
+
doc: "https://mirage.github.io/ocaml-cohttp/"
+
bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
+
depends: [
+
"ocaml" {>= "4.08"}
+
"dune" {>= "2.0"}
+
"conduit-lwt" {>= "5.0.0"}
+
"conduit-lwt-unix" {>= "5.0.0"}
+
"cmdliner"
+
"magic-mime"
+
"logs"
+
"fmt" {>= "0.8.2"}
+
"cohttp-lwt" {= version}
+
"ppx_sexp_conv" {>= "v0.13.0"}
+
"lwt" {>= "3.0.0"}
+
"base-unix"
+
"ounit" {with-test}
+
]
+
build: [
+
["dune" "subst"] {dev}
+
["dune" "build" "-p" name "-j" jobs]
+
["dune" "runtest" "-p" name "-j" jobs] {with-test}
+
]
+
dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git"
+
url {
+
src:
+
"https://github.com/mirage/ocaml-cohttp/releases/download/v5.0.0/cohttp-5.0.0.tbz"
+
checksum: [
+
"sha256=fd6ff4b86c818355d61b3a08628596dbf517d6a7da6e8edec481bb0653ca5a05"
+
"sha512=f0bfd715806965af5488010cc9388d05406b67ece0b2cb8f7803553b17a5264d03094e59127a62d37c0d6c0e74d4717e643737c43d9bcfb10b112a73d5f49c4d"
+
]
+
}
+
x-commit-hash: "5f9c0ae88a69e4280810fe73344367e90954dea5"
+51
packages/cohttp-lwt/cohttp-lwt.5.0.0/opam
···
+
opam-version: "2.0"
+
maintainer: "anil@recoil.org"
+
authors: [
+
"Anil Madhavapeddy"
+
"Stefano Zacchiroli"
+
"David Sheets"
+
"Thomas Gazagnaire"
+
"David Scott"
+
"Rudi Grinberg"
+
"Andy Ray"
+
]
+
synopsis: "CoHTTP implementation using the Lwt concurrency library"
+
description: """
+
This is a portable implementation of HTTP that uses the Lwt
+
concurrency library to multiplex IO. It implements as much of the
+
logic in an OS-independent way as possible, so that more specialised
+
modules can be tailored for different targets. For example, you
+
can install `cohttp-lwt-unix` or `cohttp-lwt-jsoo` for a Unix or
+
JavaScript backend, or `cohttp-mirage` for the MirageOS unikernel
+
version of the library. All of these implementations share the same
+
IO logic from this module."""
+
license: "ISC"
+
tags: ["org:mirage" "org:xapi-project"]
+
homepage: "https://github.com/mirage/ocaml-cohttp"
+
doc: "https://mirage.github.io/ocaml-cohttp/"
+
bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
+
depends: [
+
"ocaml" {>= "4.08"}
+
"dune" {>= "2.0"}
+
"cohttp" {= version}
+
"lwt" {>= "2.5.0"}
+
"sexplib0"
+
"ppx_sexp_conv" {>= "v0.13.0"}
+
"logs"
+
"uri" {>= "2.0.0"}
+
]
+
build: [
+
["dune" "subst"] {dev}
+
["dune" "build" "-p" name "-j" jobs]
+
["dune" "runtest" "-p" name "-j" jobs] {with-test}
+
]
+
dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git"
+
url {
+
src:
+
"https://github.com/mirage/ocaml-cohttp/releases/download/v5.0.0/cohttp-5.0.0.tbz"
+
checksum: [
+
"sha256=fd6ff4b86c818355d61b3a08628596dbf517d6a7da6e8edec481bb0653ca5a05"
+
"sha512=f0bfd715806965af5488010cc9388d05406b67ece0b2cb8f7803553b17a5264d03094e59127a62d37c0d6c0e74d4717e643737c43d9bcfb10b112a73d5f49c4d"
+
]
+
}
+
x-commit-hash: "5f9c0ae88a69e4280810fe73344367e90954dea5"
+50
packages/cohttp-mirage/cohttp-mirage.5.0.0/opam
···
+
opam-version: "2.0"
+
maintainer: "anil@recoil.org"
+
authors: ["Anil Madhavapeddy" "Thomas Gazagnaire"]
+
license: "ISC"
+
tags: ["org:mirage" "org:xapi-project"]
+
homepage: "https://github.com/mirage/ocaml-cohttp"
+
doc: "https://mirage.github.io/ocaml-cohttp/"
+
bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
+
synopsis: "CoHTTP implementation for the MirageOS unikernel"
+
description: """
+
This HTTP implementation uses the Cohttp portable implementaiton
+
along with the Lwt threading library in order to provide a
+
`Cohttp_mirage` functor that can be used in MirageOS unikernels
+
to build very small and efficient HTTP clients and servers
+
without having a hard dependency on an underlying operating
+
system.
+
+
Please see <https://mirage.io> for a self-hosted explanation
+
and instructions on how to use this library."""
+
depends: [
+
"ocaml" {>= "4.08"}
+
"dune" {>= "2.0"}
+
"mirage-flow" {>= "2.0.0"}
+
"mirage-channel" {>= "4.0.0"}
+
"conduit" {>= "2.0.2"}
+
"conduit-mirage" {>= "2.0.2"}
+
"mirage-kv" {>= "3.0.0"}
+
"lwt" {>= "2.4.3"}
+
"cohttp" {= version}
+
"cohttp-lwt" {= version}
+
"fmt" {>= "0.8.7"}
+
"astring"
+
"magic-mime"
+
"ppx_sexp_conv" {>= "v0.13.0"}
+
]
+
build: [
+
["dune" "subst"] {dev}
+
["dune" "build" "-p" name "-j" jobs]
+
["dune" "runtest" "-p" name "-j" jobs] {with-test}
+
]
+
dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git"
+
url {
+
src:
+
"https://github.com/mirage/ocaml-cohttp/releases/download/v5.0.0/cohttp-5.0.0.tbz"
+
checksum: [
+
"sha256=fd6ff4b86c818355d61b3a08628596dbf517d6a7da6e8edec481bb0653ca5a05"
+
"sha512=f0bfd715806965af5488010cc9388d05406b67ece0b2cb8f7803553b17a5264d03094e59127a62d37c0d6c0e74d4717e643737c43d9bcfb10b112a73d5f49c4d"
+
]
+
}
+
x-commit-hash: "5f9c0ae88a69e4280810fe73344367e90954dea5"
+42
packages/cohttp-top/cohttp-top.5.0.0/opam
···
+
opam-version: "2.0"
+
maintainer: "anil@recoil.org"
+
authors: [
+
"Anil Madhavapeddy"
+
"Stefano Zacchiroli"
+
"David Sheets"
+
"Thomas Gazagnaire"
+
"David Scott"
+
"Rudi Grinberg"
+
"Andy Ray"
+
]
+
synopsis: "CoHTTP toplevel pretty printers for HTTP types"
+
description: """
+
This library installs toplevel prettyprinters for CoHTTP
+
types such as the `Request`, `Response` and `Types` modules.
+
Once this library has been loaded, you can directly see the
+
values of those types in toplevels such as `utop` or `ocaml`."""
+
license: "ISC"
+
tags: ["org:mirage" "org:xapi-project"]
+
homepage: "https://github.com/mirage/ocaml-cohttp"
+
doc: "https://mirage.github.io/ocaml-cohttp/"
+
bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
+
depends: [
+
"ocaml" {>= "4.08"}
+
"dune" {>= "2.0"}
+
"cohttp" {= version}
+
]
+
build: [
+
["dune" "subst"] {dev}
+
["dune" "build" "-p" name "-j" jobs]
+
["dune" "runtest" "-p" name "-j" jobs] {with-test}
+
]
+
dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git"
+
url {
+
src:
+
"https://github.com/mirage/ocaml-cohttp/releases/download/v5.0.0/cohttp-5.0.0.tbz"
+
checksum: [
+
"sha256=fd6ff4b86c818355d61b3a08628596dbf517d6a7da6e8edec481bb0653ca5a05"
+
"sha512=f0bfd715806965af5488010cc9388d05406b67ece0b2cb8f7803553b17a5264d03094e59127a62d37c0d6c0e74d4717e643737c43d9bcfb10b112a73d5f49c4d"
+
]
+
}
+
x-commit-hash: "5f9c0ae88a69e4280810fe73344367e90954dea5"
+63
packages/cohttp/cohttp.5.0.0/opam
···
+
opam-version: "2.0"
+
maintainer: "anil@recoil.org"
+
authors: [
+
"Anil Madhavapeddy"
+
"Stefano Zacchiroli"
+
"David Sheets"
+
"Thomas Gazagnaire"
+
"David Scott"
+
"Rudi Grinberg"
+
"Andy Ray"
+
]
+
synopsis: "An OCaml library for HTTP clients and servers"
+
description: """
+
Cohttp is an OCaml library for creating HTTP daemons. It has a portable
+
HTTP parser, and implementations using various asynchronous programming
+
libraries.
+
+
See the cohttp-async, cohttp-lwt, cohttp-lwt-unix, cohttp-lwt-jsoo and
+
cohttp-mirage libraries for concrete implementations for particular
+
targets.
+
+
You can implement other targets using the parser very easily. Look at the `IO`
+
signature in `lib/s.mli` and implement that in the desired backend.
+
+
You can activate some runtime debugging by setting `COHTTP_DEBUG` to any
+
value, and all requests and responses will be written to stderr. Further
+
debugging of the connection layer can be obtained by setting `CONDUIT_DEBUG`
+
to any value."""
+
license: "ISC"
+
tags: ["org:mirage" "org:xapi-project"]
+
homepage: "https://github.com/mirage/ocaml-cohttp"
+
doc: "https://mirage.github.io/ocaml-cohttp/"
+
bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
+
depends: [
+
"ocaml" {>= "4.08"}
+
"dune" {>= "2.0"}
+
"re" {>= "1.9.0"}
+
"uri" {>= "2.0.0"}
+
"uri-sexp"
+
"sexplib0"
+
"ppx_sexp_conv" {>= "v0.13.0"}
+
"stringext"
+
"base64" {>= "3.1.0"}
+
"fmt" {with-test}
+
"jsonm" {build}
+
"alcotest" {with-test}
+
"crowbar" {with-test}
+
]
+
build: [
+
["dune" "subst"] {dev}
+
["dune" "build" "-p" name "-j" jobs]
+
["dune" "runtest" "-p" name "-j" jobs] {with-test}
+
]
+
dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git"
+
url {
+
src:
+
"https://github.com/mirage/ocaml-cohttp/releases/download/v5.0.0/cohttp-5.0.0.tbz"
+
checksum: [
+
"sha256=fd6ff4b86c818355d61b3a08628596dbf517d6a7da6e8edec481bb0653ca5a05"
+
"sha512=f0bfd715806965af5488010cc9388d05406b67ece0b2cb8f7803553b17a5264d03094e59127a62d37c0d6c0e74d4717e643737c43d9bcfb10b112a73d5f49c4d"
+
]
+
}
+
x-commit-hash: "5f9c0ae88a69e4280810fe73344367e90954dea5"