Skip to content

Releases: mirage/ocaml-cohttp

Expose more low-level interfaces for HTTP body handling

21 Aug 13:44
Compare
Choose a tag to compare

Bring make_body_writer and write_header into Cohttp.S.Http_io. Needed by ocaml-git

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)