https://bz.apache.org/bugzilla/show_bug.cgi?id=59517
Bug ID: 59517 Summary: [Help] About Header 'Content-type' Product: Tomcat 8 Version: 8.0.33 Hardware: PC Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: liuqiangqi...@huawei.com Created attachment 33840 --> https://bz.apache.org/bugzilla/attachment.cgi?id=33840&action=edit Response code I use tomcat as restful server. I call a rest api and respone like this: "servletRespone.addHeader("Content-type", "application/json; charset=UTF-8");" I wish to obtain the "Content-type" is "application/json; charset=UTF-8", but in fact I obtain "Content-type" is "application/json;charset=UTF-8". Charset between json and less of a space. I read the tomcat source and find this: public String getContentType() { String ret = contentType; if (ret != null && characterEncoding != null && charsetSet) { ret = ret + ";charset=" + characterEncoding; } return ret; } Can you help me? How do I get to be able to like "application/json; charset=UTF-8". best regards -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org