mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -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
|
||||
(** [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.
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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 *)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue