mirror of https://github.com/Tim-Paik/srv.git
0.1.8-beta fix content-type error
This commit is contained in:
parent
b04ddc4585
commit
221be83bc5
|
@ -2174,7 +2174,7 @@ checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "web"
|
name = "web"
|
||||||
version = "0.1.7-beta"
|
version = "0.1.8-beta"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"clap",
|
"clap",
|
||||||
|
|
|
@ -3,7 +3,7 @@ authors = ["Tim_Paik <timpaikc@outlook.com>"]
|
||||||
description = "simple http server written in rust"
|
description = "simple http server written in rust"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "web"
|
name = "web"
|
||||||
version = "0.1.7-beta"
|
version = "0.1.8-beta"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
|
|
|
@ -48,7 +48,7 @@ struct IndexContext<'r> {
|
||||||
|
|
||||||
#[derive(Responder)]
|
#[derive(Responder)]
|
||||||
enum Resp {
|
enum Resp {
|
||||||
#[response(status = 200)]
|
#[response(status = 200, content_type = "text/html; charset=utf-8")]
|
||||||
Index(Template),
|
Index(Template),
|
||||||
#[response(status = 404)]
|
#[response(status = 404)]
|
||||||
NotFound(&'static str),
|
NotFound(&'static str),
|
||||||
|
|
Loading…
Reference in New Issue