Merge pull request 'Also add charset=utf-8 for console and script' (#145) from add-charset into main

Reviewed-on: https://git.robur.io/robur/builder-web/pulls/145
This commit is contained in:
Reynir Björnsson 2022-11-04 14:08:14 +00:00
commit 687b6bf680

View file

@ -442,7 +442,7 @@ let routes ~datadir ~cachedir ~configdir =
|> if_error "Error getting data" |> if_error "Error getting data"
~log:(fun e -> Log.warn (fun m -> m "Error getting script or console data for build %a: %a" ~log:(fun e -> Log.warn (fun m -> m "Error getting script or console data for build %a: %a"
Uuidm.pp build pp_error e)) >>= fun data -> Uuidm.pp build pp_error e)) >>= fun data ->
let headers = [ "Content-Type", "text/plain" ] in let headers = [ "Content-Type", "text/plain; charset=utf-8" ] in
Dream.respond ~headers data |> Lwt_result.ok Dream.respond ~headers data |> Lwt_result.ok
in in