mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
prepare for 0.12
This commit is contained in:
parent
ad92acbee2
commit
a78c48955b
8 changed files with 27 additions and 10 deletions
|
|
@ -1,3 +1,11 @@
|
||||||
|
## 0.12
|
||||||
|
|
||||||
|
- add dep on `seq`
|
||||||
|
- add a `Html` module with combinators to produce html
|
||||||
|
- add `Tiny_httpd_dir.VFS` to emulate file systems
|
||||||
|
- add a small program, `tiny-httpd-vfs-pack`, to pack directories and files
|
||||||
|
(local or behind a URL) into a OCaml module using `VFS`
|
||||||
|
- show small example of socket activation
|
||||||
|
|
||||||
## 0.11
|
## 0.11
|
||||||
|
|
||||||
|
|
|
||||||
9
Makefile
9
Makefile
|
|
@ -18,3 +18,12 @@ watch:
|
||||||
@dune build @all -w
|
@dune build @all -w
|
||||||
|
|
||||||
.PHONY: benchs tests build watch
|
.PHONY: benchs tests build watch
|
||||||
|
|
||||||
|
VERSION=$(shell awk '/^version:/ {print $$2}' tiny_httpd.opam)
|
||||||
|
|
||||||
|
update_next_tag:
|
||||||
|
@echo "update version to $(VERSION)..."
|
||||||
|
sed --follow-symlinks -i "s/NEXT_VERSION/$(VERSION)/g" $(wildcard src/**.ml) $(wildcard src/**.mli) \
|
||||||
|
$(wildcard src/**/*.ml) $(wildcard src/**/*.mli)
|
||||||
|
sed --follow-symlinks -i "s/NEXT_RELEASE/$(VERSION)/g" $(wildcard src/**.ml) $(wildcard src/**.mli) \
|
||||||
|
$(wildcard src/**/*.ml) $(wildcard src/**/*.mli)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
These buffers are used to avoid allocating too many byte arrays when
|
These buffers are used to avoid allocating too many byte arrays when
|
||||||
processing streams and parsing requests.
|
processing streams and parsing requests.
|
||||||
|
|
||||||
@since NEXT_RELEASE
|
@since 0.12
|
||||||
*)
|
*)
|
||||||
|
|
||||||
type t
|
type t
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ val config :
|
||||||
unit ->
|
unit ->
|
||||||
config
|
config
|
||||||
(** Build a config from {!default_config}.
|
(** Build a config from {!default_config}.
|
||||||
@since NEXT_RELEASE *)
|
@since 0.12 *)
|
||||||
|
|
||||||
(** [add_dirpath ~config ~dir ~prefix server] adds route handle to the
|
(** [add_dirpath ~config ~dir ~prefix server] adds route handle to the
|
||||||
[server] to serve static files in [dir] when url starts with [prefix],
|
[server] to serve static files in [dir] when url starts with [prefix],
|
||||||
|
|
@ -83,7 +83,7 @@ val add_dir_path :
|
||||||
|
|
||||||
This is used to emulate a file system from pure OCaml functions and data,
|
This is used to emulate a file system from pure OCaml functions and data,
|
||||||
e.g. for resources bundled inside the web server.
|
e.g. for resources bundled inside the web server.
|
||||||
@since NEXT_RELEASE
|
@since 0.12
|
||||||
*)
|
*)
|
||||||
module type VFS = sig
|
module type VFS = sig
|
||||||
val descr : string
|
val descr : string
|
||||||
|
|
@ -118,7 +118,7 @@ end
|
||||||
val vfs_of_dir : string -> (module VFS)
|
val vfs_of_dir : string -> (module VFS)
|
||||||
(** [vfs_of_dir dir] makes a virtual file system that reads from the
|
(** [vfs_of_dir dir] makes a virtual file system that reads from the
|
||||||
disk.
|
disk.
|
||||||
@since NEXT_RELEASE
|
@since 0.12
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val add_vfs :
|
val add_vfs :
|
||||||
|
|
@ -127,14 +127,14 @@ val add_vfs :
|
||||||
prefix:string ->
|
prefix:string ->
|
||||||
Tiny_httpd_server.t -> unit
|
Tiny_httpd_server.t -> unit
|
||||||
(** Similar to {!add_dir_path} but using a virtual file system instead.
|
(** Similar to {!add_dir_path} but using a virtual file system instead.
|
||||||
@since NEXT_RELEASE
|
@since 0.12
|
||||||
*)
|
*)
|
||||||
|
|
||||||
(** An embedded file system, as a list of files with (relative) paths.
|
(** An embedded file system, as a list of files with (relative) paths.
|
||||||
This is useful in combination with the "tiny-httpd-mkfs" tool,
|
This is useful in combination with the "tiny-httpd-mkfs" tool,
|
||||||
which embeds the files it's given into a OCaml module.
|
which embeds the files it's given into a OCaml module.
|
||||||
|
|
||||||
@since NEXT_RELEASE
|
@since 0.12
|
||||||
*)
|
*)
|
||||||
module Embedded_fs : sig
|
module Embedded_fs : sig
|
||||||
type t
|
type t
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
This module provides combinators to produce html. It doesn't enforce
|
This module provides combinators to produce html. It doesn't enforce
|
||||||
the well-formedness of the html, unlike Tyxml, but it's simple and should
|
the well-formedness of the html, unlike Tyxml, but it's simple and should
|
||||||
be reasonably efficient.
|
be reasonably efficient.
|
||||||
@since NEXT_RELEASE
|
@since 0.12
|
||||||
*)
|
*)
|
||||||
|
|
||||||
(** @inline *)
|
(** @inline *)
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,7 @@ let prelude = {|
|
||||||
This output type is used to produce a string reasonably efficiently from
|
This output type is used to produce a string reasonably efficiently from
|
||||||
a tree of combinators.
|
a tree of combinators.
|
||||||
|
|
||||||
@since NEXT_RELEASE
|
@since 0.12
|
||||||
@open *)
|
@open *)
|
||||||
module Out : sig
|
module Out : sig
|
||||||
type t
|
type t
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
version: "0.11"
|
version: "0.12"
|
||||||
authors: ["Simon Cruanes"]
|
authors: ["Simon Cruanes"]
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
license: "MIT"
|
license: "MIT"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
version: "0.11"
|
version: "0.12"
|
||||||
authors: ["Simon Cruanes"]
|
authors: ["Simon Cruanes"]
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
license: "MIT"
|
license: "MIT"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue