Skip to content

Commit

Permalink
Add missing Content-Type header on 404s
Browse files Browse the repository at this point in the history
  • Loading branch information
gavtroy committed Nov 17, 2023
1 parent 40a40e5 commit 5dae939
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#[macro_use]
extern crate rocket;
#[macro_use]
extern crate structopt_derive;
extern crate chrono;
extern crate timeago;
Expand Down Expand Up @@ -341,6 +340,7 @@ fn get_error_response<'r>(

Response::build()
.status(status)
.header(ContentType::HTML)
.sized_body(Cursor::new(content))
.finalize()
}
Expand Down Expand Up @@ -416,6 +416,7 @@ fn get<'r>(

return Response::build()
.status(err_kind)
.header(ContentType::HTML)
.sized_body(Cursor::new(content))
.finalize();
}
Expand Down

0 comments on commit 5dae939

Please sign in to comment.