Releases: mirage/ocaml-cohttp
Releases · mirage/ocaml-cohttp
Support Lwt 2.5.0 and assorted interface cleanups
Compatibility breaking interface changes:
- Remove
read_form
from theRequest/Response/Header
interfaces
as this should be done inBody
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-optionalclosefn
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
Fix 204 code response headers
- Do not add content encoding for 204's (#375)
HTTP header parsing bug fixes
Top level printers, Async callv, bug fixes
- 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
- 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
- [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
Compatibility breaking interface changes:
CONNECT
andTRACE
methods added toCode
.Exhaustive matches will need updating.
New features and bug fixes:
Link
header parsing has been added asCohttp.Link
,Header.get_links
andHeader.add_links
cohttp_server_*
now obeysHEAD
requests and responds 405 to unknown methodsCohttp_async.Server.response
type is now exposed as aresponse * 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
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
Compatibility breaking interface changes:
- Response.t and Request.t fields are no longer mutable
- [lwt] Fix types in
post_form
to be astring * string list
instead
of aHeader.t
(#257) - Simplify the
Net
signature which needs to be provided for Lwt servers
to not be required. Only the Lwt client needs aNet
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
andDELETE
).
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
orcontent-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
orredirect
. Request.make
does not inject atransfer-encoding
header if there
is no body present in the request (#246).Server.respond
no longer overrides user-supplied headers that
specify thecontent-length
ortransfer-encoding
headers (#268).cohttp_server_lwt
andcohttp_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
andIO.oc
types forCohttp_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)