From e86d5ff214cc2e5f12d1f355dfd706a13310a9b8 Mon Sep 17 00:00:00 2001 From: Arnav Jindal Date: Wed, 3 Mar 2021 22:08:29 +0530 Subject: [PATCH] Fixes Incorrect Return of body in multipart example (#407) --- forms/multipart-async-std/src/main.rs | 4 +++- forms/multipart-s3/src/main.rs | 4 +++- forms/multipart/src/main.rs | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/forms/multipart-async-std/src/main.rs b/forms/multipart-async-std/src/main.rs index c1ab988..aefea22 100644 --- a/forms/multipart-async-std/src/main.rs +++ b/forms/multipart-async-std/src/main.rs @@ -35,7 +35,9 @@ fn index() -> HttpResponse { "#; - HttpResponse::Ok().body(html) + HttpResponse::Ok() + .content_type("text/html; charset=utf-8") + .body(html) } #[actix_web::main] diff --git a/forms/multipart-s3/src/main.rs b/forms/multipart-s3/src/main.rs index 2a483ed..d673501 100644 --- a/forms/multipart-s3/src/main.rs +++ b/forms/multipart-s3/src/main.rs @@ -69,7 +69,9 @@ fn index() -> HttpResponse { "#; - HttpResponse::Ok().body(html) + HttpResponse::Ok() + .content_type("text/html; charset=utf-8") + .body(html) } #[actix_web::main] diff --git a/forms/multipart/src/main.rs b/forms/multipart/src/main.rs index f0d75c3..7e1a03b 100644 --- a/forms/multipart/src/main.rs +++ b/forms/multipart/src/main.rs @@ -37,7 +37,9 @@ fn index() -> HttpResponse { "#; - HttpResponse::Ok().body(html) + HttpResponse::Ok() + .content_type("text/html; charset=utf-8") + .body(html) } #[actix_web::main]