From ce4b5f0a117545c57eb8f64ece8cd90639b05182 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Mon, 20 Dec 2021 09:49:44 -0500 Subject: [PATCH] some small code improvements --- src/Tiny_httpd.mli | 3 ++- src/Tiny_httpd_dir.ml | 10 +++++----- src/Tiny_httpd_dir.mli | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Tiny_httpd.mli b/src/Tiny_httpd.mli index 539f440c..5cac900d 100644 --- a/src/Tiny_httpd.mli +++ b/src/Tiny_httpd.mli @@ -456,7 +456,8 @@ 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] **) + [exact "foo" @/ exact "bar" @/ ... @/ r] + @since NEXT_RELEASE **) val pp : Format.formatter -> _ t -> unit (** Print the route. diff --git a/src/Tiny_httpd_dir.ml b/src/Tiny_httpd_dir.ml index d7edcae9..c26c5a95 100644 --- a/src/Tiny_httpd_dir.ml +++ b/src/Tiny_httpd_dir.ml @@ -14,11 +14,11 @@ type config = { } let default_config () : config = - { download=true - ; dir_behavior=Forbidden - ; delete=false - ; upload=false - ; max_upload_size = 10 * 1024 * 1024 + { download=true; + dir_behavior=Forbidden; + delete=false; + upload=false; + max_upload_size = 10 * 1024 * 1024; } let contains_dot_dot s = diff --git a/src/Tiny_httpd_dir.mli b/src/Tiny_httpd_dir.mli index 877b7d77..cf8a332c 100644 --- a/src/Tiny_httpd_dir.mli +++ b/src/Tiny_httpd_dir.mli @@ -5,7 +5,7 @@ type dir_behavior = (** Redirect to index.html if present *) | Lists (** Lists content of directory *) - | IndexAndLists + | Index_or_lists (** Redirect to index.html if present and Lists content otherwise *) | Forbidden (** Forbid access to directory *)