From 221be83bc523b6bbd63a58bb38c2ee9df504dbf1 Mon Sep 17 00:00:00 2001 From: Tim-Paik Date: Sat, 14 Aug 2021 22:08:26 +0800 Subject: [PATCH] 0.1.8-beta fix content-type error --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8e9a9a8..95772d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2174,7 +2174,7 @@ checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" [[package]] name = "web" -version = "0.1.7-beta" +version = "0.1.8-beta" dependencies = [ "chrono", "clap", diff --git a/Cargo.toml b/Cargo.toml index 961770f..b35a23c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ authors = ["Tim_Paik "] description = "simple http server written in rust" edition = "2018" name = "web" -version = "0.1.7-beta" +version = "0.1.8-beta" [dependencies] chrono = "0.4" diff --git a/src/main.rs b/src/main.rs index 1a0d811..68600cc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,7 +48,7 @@ struct IndexContext<'r> { #[derive(Responder)] enum Resp { - #[response(status = 200)] + #[response(status = 200, content_type = "text/html; charset=utf-8")] Index(Template), #[response(status = 404)] NotFound(&'static str),