mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 03:05:29 -05:00
Update src/Tiny_httpd_dir.ml
This commit is contained in:
parent
ce4b5f0a11
commit
e1ddb96e7c
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ let contains_dot_dot s =
|
|||
let human_size (x:int) : string =
|
||||
if x >= 1_000_000_000 then Printf.sprintf "%d.%dG" (x / 1_000_000_000) ((x/1_000_000) mod 1_000_000)
|
||||
else if x >= 1_000_000 then Printf.sprintf "%d.%dM" (x / 1_000_000) ((x/1000) mod 1_000)
|
||||
else if x >= 1_000 then Printf.sprintf "%d.%dk" (x/1000) ((x/100) mod 10)
|
||||
else if x >= 1_000 then Printf.sprintf "%d.%dk" (x/1000) ((x/100) mod 100)
|
||||
else Printf.sprintf "%db" x
|
||||
|
||||
let header_html = "Content-Type", "text/html"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue