Skip to content

Commit

Permalink
Merge pull request #327 from avsm/master
Browse files Browse the repository at this point in the history
Sync CHANGES
  • Loading branch information
avsm committed Apr 18, 2015
2 parents b9133d8 + 42bae1f commit fdf7b2e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
21 changes: 12 additions & 9 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
0.17.0 (2015-04-17):

Compatibility breaking interface changes:
* CONNECT and TRACE methods added to Code. Exhaustive matches will need updating.
* `CONNECT` and `TRACE` methods added to `Code`.Exhaustive matches will need updating.

New features and bug fixes:
* Link header parsing has been added as Link, Header.get_links, 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
* `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 `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 *`)

0.16.1 (2015-04-09):
New features and bug fixes:
Expand All @@ -27,6 +27,8 @@ Compatibility breaking interface changes:
* 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)
* The `Request` and `Response` records are no longer mutable, so use
functional updates instead via `Fieldslib.Field.fset Request.Fields.<field>`. (#296)
* `Request.has_body` does not permit a body to be set for methods that
RFC7231 forbids from having one (`HEAD`, `GET` and `DELETE`).

Expand Down Expand Up @@ -65,6 +67,7 @@ New features and bug fixes:
`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)
* Fix installation of server binaries in OPAM metadata. (#295)

0.15.2 (2015-02-15):
* When transfer encoding is unknown, read until EOF when body size is unknown. (#241)
Expand Down
7 changes: 2 additions & 5 deletions lib_test/test_net_async.ml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let show_headers h =

let make_net_req () =
let headers = Cohttp.Header.of_list [ "connection", "close" ] in
let uri = Uri.of_string "https://github.com/" in
let uri = Uri.of_string "http://github.com/" in
Client.get ~headers uri
>>= fun (res, body) ->
show_headers (Cohttp.Response.headers res);
Expand Down Expand Up @@ -71,14 +71,11 @@ let make_net_post_req () =
return ()

let run () =
Monitor.try_with (fun () ->
make_net_req ()
>>= make_net_ssl_req
>>= make_net_post_req
)

let test_cases =
let open Command.Spec in
Command.async_basic ~summary:"Run HTTP Async client tests"
empty make_net_req
empty run
|> Command.run

0 comments on commit fdf7b2e

Please sign in to comment.