From 2ded5a24fc68a733df7620211f76a3958914ba05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E7=BF=8A=20SionYang?= <263976490@qq.com> Date: Wed, 16 Sep 2020 09:14:03 +0800 Subject: [PATCH] Set mediaType charset as utf8 (#3837) --- .../alibaba/nacos/common/http/param/MediaType.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/src/main/java/com/alibaba/nacos/common/http/param/MediaType.java b/common/src/main/java/com/alibaba/nacos/common/http/param/MediaType.java index ecb05abb1..4838f9613 100644 --- a/common/src/main/java/com/alibaba/nacos/common/http/param/MediaType.java +++ b/common/src/main/java/com/alibaba/nacos/common/http/param/MediaType.java @@ -28,7 +28,7 @@ public final class MediaType { public static final String APPLICATION_ATOM_XML = "application/atom+xml"; - public static final String APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded"; + public static final String APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded;charset=UTF-8"; public static final String APPLICATION_OCTET_STREAM = "application/octet-stream"; @@ -36,14 +36,14 @@ public final class MediaType { public static final String APPLICATION_XHTML_XML = "application/xhtml+xml"; - public static final String APPLICATION_XML = "application/xml"; + public static final String APPLICATION_XML = "application/xml;charset=UTF-8"; - public static final String APPLICATION_JSON = "application/json"; + public static final String APPLICATION_JSON = "application/json;charset=UTF-8"; - public static final String MULTIPART_FORM_DATA = "multipart/form-data"; + public static final String MULTIPART_FORM_DATA = "multipart/form-data;charset=UTF-8"; - public static final String TEXT_HTML = "text/html"; + public static final String TEXT_HTML = "text/html;charset=UTF-8"; - public static final String TEXT_PLAIN = "text/plain"; + public static final String TEXT_PLAIN = "text/plain;charset=UTF-8"; }