Skip to content

Releases: mirage/ocaml-cohttp

Support Lwt 2.5.0 and assorted interface cleanups

05 Aug 11:40
Compare
Choose a tag to compare

Compatibility breaking interface changes:

  • Remove read_form from the Request/Response/Header interfaces
    as this should be done in Body handling instead (#401).

New features and bug fixes:

  • Remove IO.write_line as it was unused in any interfaces.
  • Do not use the lwt camlp4 extension. No observable external difference.
  • Do not return a code stacktrace in the default 500 handler.
  • Add Cohttp.Header.compare (#411)
  • Fix typos in CLI documentation (#413 via @moonlightdrive)
  • Use the Lwt 2.5.0 buffer API.
  • Cohttp_lwt.read_response now has a non-optional closefn parameter (#400).
  • Add a Cohttp_lwt_s module that contains all the Lwt module types
    in one convenient place (#397).

HTTP pipelining and DELETE improvements

12 Jul 16:47
Compare
Choose a tag to compare
  • Allow DELETE requests to have request bodies (#383).
  • Improve the Lwt client callv for HTTP/1.1 pipelined
    requests (#379 via Török Edwin).

Fix 204 code response headers

12 Jul 16:46
Compare
Choose a tag to compare
  • Do not add content encoding for 204's (#375)

HTTP header parsing bug fixes

12 Jul 16:46
Compare
Choose a tag to compare
  • Remove trailing whitespace from headers (#372)
  • Don't reverse order of list valued headers (#372)

Top level printers, Async callv, bug fixes

02 Jun 20:56
Compare
Choose a tag to compare
  • Add Cohttp_async.Client.callv. Allows for making requests while reusing an
    HTTP connection (#344)
  • Responses of status 1xx/204/304 have no bodies and cohttp should not attempt
    to read them (#355)
  • Add top level printers. See cohttp.top findlib package (#363)
  • Add Header.to_string (#362)
  • Fix chunk truncation in chunked transfer encoding (#360)

Compatibility breaking interface changes:

  • Remove Request/Response modules outside of Cohttp pack (#349)

Much better handling of large fixed size bodies

24 May 17:45
Compare
Choose a tag to compare
  • Remove dependency on the Lwt Camlp4 syntax extension (#334).
  • Add make github target to push documentation to GitHub Pages
    (#338 from Jyotsna Prakash).
  • [async] Add Cohttp_async.Server.close to shutdown server (#337).
  • Add Async integration tests and consolidate Lwt tests using the
    new framework (#337).
  • Fix allocation of massive buffer when handling fixed size http bodies (#345)

Improved Async buffer handling

24 Apr 16:27
Compare
Choose a tag to compare
  • [async] Limit buffer size to a maximum of 32K in the Async backend
    (#330 from Stanislav Artemkin).
  • Add Cohttp.Conf.version with the library version number included.
  • Remove debug output from cohttp-curl-async.
  • Add the beginning of a DESIGN.md document to explain the library structure.

Support more HTTP methods, Link support and stability improvements

18 Apr 14:42
Compare
Choose a tag to compare

Compatibility breaking interface changes:

  • CONNECT and TRACE methods added to Code.Exhaustive matches will need updating.

New features and bug fixes:

  • Link header parsing has been added as Cohttp.Link, Header.get_links and Header.add_links
  • cohttp_server_* now obeys HEAD requests and responds 405 to unknown methods
  • Cohttp_async.Server.response type is now exposed as a response * body pair
  • Failure to read a body in a pipelined response no longer terminates the stream
  • Fix cohttp_curl_lwt -X HEAD sending empty chunked body (#313)
  • Fix a bug which left extra \r\n in buffer at end of chunked reads
  • Fix handling of request URI for query strings and CONNECT proxies (#308, #318)
  • Fix precedence of Host header when request-URI is absolute URI
  • Fix request URI path to be non-empty except for * requests (e.g. OPTIONS *)

Fix Uri Handling

09 Apr 21:34
Compare
Choose a tag to compare

New features and bug fixes:

  • Fix handling of request paths starting with multiple slashes (#308)

Improved interface for headers, bug fixes for Uri, empty chunks, uninstalling binaries

04 Apr 18:16
Compare
Choose a tag to compare

Compatibility breaking interface changes:

  • Response.t and Request.t fields are no longer mutable
  • [lwt] Fix types in post_form to be a string * string list instead
    of a Header.t (#257)
  • Simplify the Net signature which needs to be provided for Lwt servers
    to not be required. Only the Lwt client needs a Net functor argument
    to make outgoing connections. (#274)
  • Request.has_body does not permit a body to be set for methods that
    RFC7231 forbids from having one (HEAD, GET and DELETE).

New features and bug fixes:

  • Fix linking problem caused by sub-libraries using cohttp modules outside the
    cohttp pack.
  • Added async client for S3. (#304)
  • Fix String_io.read_line to trim '\r' from end of string (#300)
  • Fix cohttp-server-lwt to correctly bind to a specific interface (#298).
  • Add Cohttp_async.request to send raw, umodified requests.
  • Supplying a content-range or content-range header in any client
    request will always override any other encoding preference (#281).
  • Add a cohttp-lwt-proxy to act as an HTTP proxy. (#248)
  • Extend cohttp-server-async file server to work with HTTPS (#277).
  • Copy basic auth from Uri.userinfo into the Authorization header
    for HTTP requests. (#255)
  • Install binaries via an OPAM .install file to ensure that they are
    reliably uninstalled. (#252)
  • Use the magic-mime library to add a MIME type by probing filename
    during static serving in the Lwt/Async backends. (#260)
  • Add Cohttp.Header.add_opt_unless_exists to set a header only if
    an override wasn't supplied, and to initialise a fresh Header value
    if none is present.
  • Do not override user-supplied headers in post_form or redirect.
  • Request.make does not inject a transfer-encoding header if there
    is no body present in the request (#246).
  • Server.respond no longer overrides user-supplied headers that
    specify the content-length or transfer-encoding headers (#268).
  • cohttp_server_lwt and cohttp_server_async now include sizes in
    directory listing titles
  • Add Header.add_multi to initialise a header structure with multiple
    fields more efficiently (#272).
  • Expose IO.ic and IO.oc types for Cohttp_async (#271).
  • Skip empty body chunks in Transfer_io.write (#270).
  • With the Lwt backend, read hangs if trying to fetch more than
    Sys.max_string_length (which can be triggered on 32-bit platforms).
    Read only a maximum that fits into a string (#282).
  • cohttp-curl-lwt now takes http method as parameter (#288)