【发布时间】:2020-02-18 13:44:21
【问题描述】:
代码
public class HomeController : Controller
{
public ActionResult Index()
{
return Content("hello", "text/plain");
}
}
正在响应标题
Content-Type: text/plain; charset=utf-8
我的问题是如何从响应标头 Content-Type 中删除“;charset=utf-8”?
这里How do I remove the charset from Content-Type in a ASP.NET Core MVC response?是如何在asp.net core上做的。
【问题讨论】:
-
为什么要删除它?
-
@Moo-Juice,客户希望如此
-
@thirdDeveloper,不,它不是重复的,关于核心
-
删除它不会有任何效果,客户只会假设
charset=utf8。毫无意义。
标签: c# asp.net-mvc asp.net-mvc-5 http-headers content-type