From d1b47f8908f7ca71da1f767432bb33cb87bbee14 Mon Sep 17 00:00:00 2001 From: Steven Pease Date: Sun, 10 Mar 2019 12:26:00 -0700 Subject: Default to UTF-8 mime type for actix-web and gotham --- testing/tests/actix_web.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'testing/tests/actix_web.rs') diff --git a/testing/tests/actix_web.rs b/testing/tests/actix_web.rs index 7f2d835..e434ce3 100644 --- a/testing/tests/actix_web.rs +++ b/testing/tests/actix_web.rs @@ -18,7 +18,10 @@ fn test_actix_web() { let request = srv.get().finish().unwrap(); let response = srv.execute(request.send()).unwrap(); assert!(response.status().is_success()); - assert_eq!(response.headers().get(CONTENT_TYPE).unwrap(), "text/html"); + assert_eq!( + response.headers().get(CONTENT_TYPE).unwrap(), + "text/html; charset=utf-8" + ); let bytes = srv.execute(response.body()).unwrap(); assert_eq!(bytes, Bytes::from_static("Hello, world!".as_ref())); @@ -36,7 +39,10 @@ fn test_actix_web_responder() { let request = srv.get().finish().unwrap(); let response = srv.execute(request.send()).unwrap(); assert!(response.status().is_success()); - assert_eq!(response.headers().get(CONTENT_TYPE).unwrap(), "text/html"); + assert_eq!( + response.headers().get(CONTENT_TYPE).unwrap(), + "text/html; charset=utf-8" + ); let bytes = srv.execute(response.body()).unwrap(); assert_eq!(bytes, Bytes::from_static("Hello, world!".as_ref())); -- cgit