Skip to content

Commit

Permalink
Bump tiny_httpd 0.16 -> 0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeom authored and c-cube committed Sep 13, 2024
1 parent 422d687 commit 52063a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion benchpress-server.opam
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ depends: [
"gnuplot" { >= "0.6" & < "0.8" }
"sqlite3"
"sqlite3_utils" { >= "0.4" & < "0.5" }
"tiny_httpd" { >= "0.16" & < "1.0" }
"tiny_httpd" { >= "0.17" & < "1.0" }
"printbox" { >= "0.6" }
"printbox-text" { >= "0.6" }
"ocaml" {>= "4.12" }
Expand Down
6 changes: 3 additions & 3 deletions src/server/benchpress_server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
open Common
module T = Test
module H = Tiny_httpd
module U = Tiny_httpd_util
module U = Tiny_httpd.Util
module PB = PrintBox
module Log = (val Logs.src_log (Logs.Src.create "benchpress-serve"))

Expand Down Expand Up @@ -1746,9 +1746,9 @@ let handle_file self : unit =
Log.debug (fun k -> k "get-file: `%s`" file);
let bytes =
if file = "prelude" then
H.Byte_stream.of_string Builtin_config.config (* magic file! *)
H.IO.Input.of_string Builtin_config.config (* magic file! *)
else (
try H.Byte_stream.of_chan @@ open_in file
try H.IO.Input.of_in_channel @@ open_in file
with e ->
H.Response.fail_raise ~code:404
"cannot open file %S:\n\
Expand Down

0 comments on commit 52063a7

Please sign in to comment.