mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 03:05:29 -05:00
some small code improvements
This commit is contained in:
parent
fe0da80f2f
commit
ce4b5f0a11
3 changed files with 8 additions and 7 deletions
|
|
@ -456,7 +456,8 @@ module Route : sig
|
||||||
|
|
||||||
val exact_path : string -> ('a,'b) t -> ('a,'b) t
|
val exact_path : string -> ('a,'b) t -> ('a,'b) t
|
||||||
(** [exact_path "foo/bar/..." r] is equivalent to
|
(** [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
|
val pp : Format.formatter -> _ t -> unit
|
||||||
(** Print the route.
|
(** Print the route.
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@ type config = {
|
||||||
}
|
}
|
||||||
|
|
||||||
let default_config () : config =
|
let default_config () : config =
|
||||||
{ download=true
|
{ download=true;
|
||||||
; dir_behavior=Forbidden
|
dir_behavior=Forbidden;
|
||||||
; delete=false
|
delete=false;
|
||||||
; upload=false
|
upload=false;
|
||||||
; max_upload_size = 10 * 1024 * 1024
|
max_upload_size = 10 * 1024 * 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
let contains_dot_dot s =
|
let contains_dot_dot s =
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ type dir_behavior =
|
||||||
(** Redirect to index.html if present *)
|
(** Redirect to index.html if present *)
|
||||||
| Lists
|
| Lists
|
||||||
(** Lists content of directory *)
|
(** Lists content of directory *)
|
||||||
| IndexAndLists
|
| Index_or_lists
|
||||||
(** Redirect to index.html if present and Lists content otherwise *)
|
(** Redirect to index.html if present and Lists content otherwise *)
|
||||||
| Forbidden
|
| Forbidden
|
||||||
(** Forbid access to directory *)
|
(** Forbid access to directory *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue