Skip to content

Commit 9eb3cbf

Browse files
committed
prepare for 0.17
1 parent 0b4c282 commit 9eb3cbf

File tree

9 files changed

+43
-17
lines changed

9 files changed

+43
-17
lines changed

CHANGES.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
11
## Pending
22

3+
## 0.17
4+
5+
- add optional middlewares to tiny_httpd_ws
6+
- add `Head_middleware.trivial`
7+
- add `Head_middleware.t`; accept it for SSE/websocket
8+
- add `Request.pp_with` which is a customizable printer
9+
- expose `Response.Bad_req`
10+
- use `iostream` for IOs
11+
- add a `hmap`-typed field to requests, to carry request specific data
12+
across middlewares
13+
- http_of_dir: ability to setup socket timeout
14+
- add `tiny_httpd.ws`, a websocket library
15+
- add `Response_code.is_success`
16+
317
- fix: No setting of sigprocmask on Windows
18+
- fix: give the correct code+error if protocol upgrade fails
19+
- remove potentially security-leaking debug line
20+
- fix: avoid collisions in `Mime_` private module
21+
- fix middlewares: merge-sort per-request middleares and global ones
22+
- fix tiny_httpd dir: handle html files
23+
24+
- perf: optim in read_line
25+
- perf: remove some uses of scanf in parsing
26+
27+
- require iostream-camlzip >= 0.2.1
28+
- add optional dependency on `logs`
29+
- logs is a testdep for tiny_httpd_camlzip
430

531
## 0.16
632

dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
(authors c-cube)
66
(maintainers c-cube)
7-
(version 0.16)
7+
(version 0.17)
88
(source (github c-cube/tiny_httpd))
99
(homepage https://github.com/c-cube/tiny_httpd/)
1010
(license MIT)

src/core/request.mli

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type 'body t = private {
1111
(** Host header, mandatory. It can also be found in {!headers}. *)
1212
client_addr: Unix.sockaddr; (** Client address. Available since 0.14. *)
1313
headers: Headers.t; (** List of headers. *)
14-
mutable meta: Hmap.t; (** Metadata. @since NEXT_RELEASE *)
14+
mutable meta: Hmap.t; (** Metadata. @since 0.17 *)
1515
http_version: int * int;
1616
(** HTTP version. This should be either [1, 0] or [1, 1]. *)
1717
path: string; (** Full path of the requested URL. *)
@@ -38,16 +38,16 @@ type 'body t = private {
3838

3939
val add_meta : _ t -> 'a Hmap.key -> 'a -> unit
4040
(** Add metadata
41-
@since NEXT_RELEASE *)
41+
@since 0.17 *)
4242

4343
val get_meta : _ t -> 'a Hmap.key -> 'a option
4444
(** Get metadata
45-
@since NEXT_RELEASE *)
45+
@since 0.17 *)
4646

4747
val get_meta_exn : _ t -> 'a Hmap.key -> 'a
4848
(** Like {!get_meta} but can fail
4949
@raise Invalid_argument if not present
50-
@since NEXT_RELEASE *)
50+
@since 0.17 *)
5151

5252
val pp_with :
5353
?mask_header:(string -> bool) ->
@@ -94,7 +94,7 @@ val set_header : string -> string -> 'a t -> 'a t
9494

9595
val remove_header : string -> 'a t -> 'a t
9696
(** Remove one instance of this header.
97-
@since NEXT_RELEASE *)
97+
@since 0.17 *)
9898

9999
val update_headers : (Headers.t -> Headers.t) -> 'a t -> 'a t
100100
(** Modify headers using the given function.

src/core/response.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ val update_headers : (Headers.t -> Headers.t) -> t -> t
3838

3939
val remove_header : string -> t -> t
4040
(** Remove one instance of this header.
41-
@since NEXT_RELEASE *)
41+
@since 0.17 *)
4242

4343
val set_headers : Headers.t -> t -> t
4444
(** Set all headers.

src/core/response_code.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ val descr : t -> string
1717

1818
val is_success : t -> bool
1919
(** [is_success code] is true iff [code] is in the [2xx] or [3xx] range.
20-
@since NEXT_RELEASE *)
20+
@since 0.17 *)

src/core/server.mli

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ end
4141
4242
These middlewares are simpler than full {!Middleware.t} and
4343
work in more contexts.
44-
@since NEXT_RELEASE *)
44+
@since 0.17 *)
4545
module Head_middleware : sig
4646
type t = { handle: 'a. 'a Request.t -> 'a Request.t }
4747
(** A handler that takes the request, without its body,
4848
and possibly modifies it.
49-
@since NEXT_RELEASE *)
49+
@since 0.17 *)
5050

5151
val trivial : t
5252
(** Pass through *)
@@ -260,10 +260,10 @@ val add_route_server_sent_handler :
260260
(** {2 Upgrade handlers}
261261
262262
These handlers upgrade the connection to another protocol.
263-
@since NEXT_RELEASE *)
263+
@since 0.17 *)
264264

265265
(** Handler that upgrades to another protocol.
266-
@since NEXT_RELEASE *)
266+
@since 0.17 *)
267267
module type UPGRADE_HANDLER = sig
268268
type handshake_state
269269
(** Some specific state returned after handshake *)
@@ -287,7 +287,7 @@ module type UPGRADE_HANDLER = sig
287287
end
288288

289289
type upgrade_handler = (module UPGRADE_HANDLER)
290-
(** @since NEXT_RELEASE *)
290+
(** @since 0.17 *)
291291

292292
val add_upgrade_handler :
293293
?accept:(unit Request.t -> (unit, Response_code.t * string) result) ->

src/core/util.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ val parse_query : string -> ((string * string) list, string) result
3737

3838
val show_sockaddr : Unix.sockaddr -> string
3939
(** Simple printer for socket addresses.
40-
@since NEXT_RELEASE *)
40+
@since 0.17 *)
4141

4242
val is_ipv6_str : string -> bool
4343
(** Is this string potentially an IPV6 address?
44-
@since NEXT_RELEASE *)
44+
@since 0.17 *)

tiny_httpd.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is generated by dune, edit dune-project instead
22
opam-version: "2.0"
3-
version: "0.16"
3+
version: "0.17"
44
synopsis: "Minimal HTTP server using threads"
55
maintainer: ["c-cube"]
66
authors: ["c-cube"]

tiny_httpd_camlzip.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is generated by dune, edit dune-project instead
22
opam-version: "2.0"
3-
version: "0.16"
3+
version: "0.17"
44
synopsis: "Interface to camlzip for tiny_httpd"
55
maintainer: ["c-cube"]
66
authors: ["c-cube"]

0 commit comments

Comments
 (0)