fix: send charset=utf-8 for content-type header
This commit is contained in:
parent
7bd1c5a45a
commit
cd0f38764d
|
@ -30,6 +30,8 @@ public class RawArticle : PageModel
|
|||
return NotFound();
|
||||
}
|
||||
|
||||
Response.Headers.Add("Content-Type", "text/plain; charset=utf-8");
|
||||
|
||||
using Utf8ValueStringBuilder builder = ZString.CreateUtf8StringBuilder();
|
||||
builder.AppendLine("# " + post.Title);
|
||||
if (_blogService.TryGetAuthor(post, out Author? author))
|
||||
|
@ -41,6 +43,6 @@ public class RawArticle : PageModel
|
|||
|
||||
builder.AppendLine();
|
||||
builder.AppendLine(post.Body);
|
||||
return Content(builder.ToString(), "text/plain");
|
||||
return Content(builder.ToString());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue