From 3a7019c7cb8811825b92a926d6eaa308948247ff Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 31 Dec 2021 20:44:42 -0500 Subject: [PATCH] prepare for 0.11 --- src/Tiny_httpd.mli | 20 ++++++++++---------- src/Tiny_httpd_dir.mli | 2 +- src/camlzip/Tiny_httpd_camlzip.mli | 2 +- tests/dune | 8 ++++++++ tiny_httpd.opam | 2 +- tiny_httpd_camlzip.opam | 2 +- 6 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/Tiny_httpd.mli b/src/Tiny_httpd.mli index 2f90c5bf..158a69fd 100644 --- a/src/Tiny_httpd.mli +++ b/src/Tiny_httpd.mli @@ -230,7 +230,7 @@ module Request : sig body: 'body; start_time: float; (** Obtained via [get_time_s] in {!create} - @since NEXT_RELEASE *) + @since 0.11 *) } (** A request with method, path, host, headers, and a body, sent by a client. @@ -241,8 +241,8 @@ module Request : sig @since 0.6 The field [query] was added and contains the query parameters in ["?foo=bar,x=y"] @since 0.6 The field [path_components] is the part of the path that precedes [query] and is split on ["/"]. - @since NEXT_RELEASE the type is a private alias - @since NEXT_RELEASE the field [start_time] was added + @since 0.11 the type is a private alias + @since 0.11 the field [start_time] was added *) val pp : Format.formatter -> string t -> unit @@ -287,7 +287,7 @@ module Request : sig val start_time : _ t -> float (** time stamp (from {!Unix.gettimeofday}) after parsing the first line of the request - @since NEXT_RELEASE *) + @since 0.11 *) val limit_body_size : max_size:int -> byte_stream t -> byte_stream t (** Limit the body size to [max_size] bytes, or return @@ -298,7 +298,7 @@ module Request : sig val read_body_full : ?buf_size:int -> byte_stream t -> string t (** Read the whole body into a string. Potentially blocking. - @param buf_size initial size of underlying buffer (since NEXT_RELEASE) *) + @param buf_size initial size of underlying buffer (since 0.11) *) (**/**) (* for testing purpose, do not use *) @@ -460,7 +460,7 @@ module Route : sig val exact_path : string -> ('a,'b) t -> ('a,'b) t (** [exact_path "foo/bar/..." r] is equivalent to [exact "foo" @/ exact "bar" @/ ... @/ r] - @since NEXT_RELEASE **) + @since 0.11 **) val pp : Format.formatter -> _ t -> unit (** Print the route. @@ -476,7 +476,7 @@ end A middleware can be inserted in a handler to modify or observe its behavior. - @since NEXT_RELEASE + @since 0.11 *) module Middleware : sig type handler = byte_stream Request.t -> resp:(Response.t -> unit) -> unit @@ -523,7 +523,7 @@ val create : @param masksigpipe if true, block the signal {!Sys.sigpipe} which otherwise tends to kill client threads when they try to write on broken sockets. Default: [true]. - @param buf_size size for buffers (since NEXT_RELEASE) + @param buf_size size for buffers (since 0.11) @param new_thread a function used to spawn a new thread to handle a new client connection. By default it is {!Thread.create} but one @@ -543,7 +543,7 @@ val create : used. This parameter exists since 0.10. @param get_time_s obtain the current timestamp in seconds. - This parameter exists since NEXT_RELEASE. + This parameter exists since 0.11. *) val addr : t -> string @@ -591,7 +591,7 @@ val add_middleware : @param stage specify when middleware applies. Encoding comes first (outermost layer), then stages in increasing order. @raise Invalid_argument if stage is [`Stage n] where [n < 1] - @since NEXT_RELEASE + @since 0.11 *) (** {2 Request handlers} *) diff --git a/src/Tiny_httpd_dir.mli b/src/Tiny_httpd_dir.mli index 9697eb89..fbd457d9 100644 --- a/src/Tiny_httpd_dir.mli +++ b/src/Tiny_httpd_dir.mli @@ -5,7 +5,7 @@ It exposes a directory (and its subdirectories), with the optional ability to delete or upload files. - @since NEXT_RELEASE *) + @since 0.11 *) (** behavior of static directory. diff --git a/src/camlzip/Tiny_httpd_camlzip.mli b/src/camlzip/Tiny_httpd_camlzip.mli index 2ca5c6a6..9fc75267 100644 --- a/src/camlzip/Tiny_httpd_camlzip.mli +++ b/src/camlzip/Tiny_httpd_camlzip.mli @@ -4,7 +4,7 @@ val middleware : ?buf_size:int -> unit -> Tiny_httpd.Middleware.t (** Middleware responsible for deflate compression/decompression. - @since NEXT_RELEASE *) + @since 0.11 *) val setup : ?compress_above:int -> diff --git a/tests/dune b/tests/dune index 363933bf..d93bc2fb 100644 --- a/tests/dune +++ b/tests/dune @@ -4,10 +4,12 @@ (deps (:bin ../examples/echo.exe)) (locks /port) (enabled_if (= %{system} "linux")) + (package tiny_httpd_camlzip) (action (with-stdout-to %{targets} (run ./echo1.sh %{bin})))) (rule (alias runtest) + (package tiny_httpd_camlzip) (action (diff echo1.expect echo1.out))) (rule @@ -15,34 +17,40 @@ (deps (:bin ../examples/sse_server.exe)) (locks /port) (enabled_if (= %{system} "linux")) + (package tiny_httpd) (action (with-stdout-to %{targets} (run ./sse_count.sh %{bin})))) (rule (alias runtest) + (package tiny_httpd) (action (diff sse_count.expect sse_count.out))) (rule (targets upload-out) (deps (:bin ../src/bin/http_of_dir.exe) foo_50) (locks /port) + (package tiny_httpd) (enabled_if (= %{system} "linux")) (action (with-stdout-to %{targets} (run ./upload_chunked.sh %{bin})))) (rule (alias runtest) + (package tiny_httpd) (action (diff upload-out.expect upload-out))) (rule (targets dl-out) (deps (:bin ../src/bin/http_of_dir.exe) foo_50) (locks /port) + (package tiny_httpd) (enabled_if (= %{system} "linux")) (action (with-stdout-to %{targets} (run ./download_chunked.sh %{bin})))) (rule (alias runtest) + (package tiny_httpd) (action (diff dl-out.expect dl-out))) diff --git a/tiny_httpd.opam b/tiny_httpd.opam index 8a0df3ff..1e50a45c 100644 --- a/tiny_httpd.opam +++ b/tiny_httpd.opam @@ -1,5 +1,5 @@ opam-version: "2.0" -version: "0.10" +version: "0.11" authors: ["Simon Cruanes"] maintainer: "simon.cruanes.2007@m4x.org" license: "MIT" diff --git a/tiny_httpd_camlzip.opam b/tiny_httpd_camlzip.opam index a6c89601..11da244a 100644 --- a/tiny_httpd_camlzip.opam +++ b/tiny_httpd_camlzip.opam @@ -1,5 +1,5 @@ opam-version: "2.0" -version: "0.10" +version: "0.11" authors: ["Simon Cruanes"] maintainer: "simon.cruanes.2007@m4x.org" license: "MIT"