Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

ContentResult ignores ContentEncoding #1428

Closed
javiercn opened this issue Oct 21, 2014 · 1 comment
Closed

ContentResult ignores ContentEncoding #1428

javiercn opened this issue Oct 21, 2014 · 1 comment
Assignees
Milestone

Comments

@javiercn
Copy link
Member

ContentResult has a ContentEncoding property to specify the encoding of the response, but on the implementation we silently ignore it.

public override async Task ExecuteResultAsync([NotNull] ActionContext context)
{
    var response = context.HttpContext.Response;

    if (!string.IsNullOrEmpty(ContentType))
    {
        response.ContentType = ContentType;
    }

    if (Content != null)
    {
        await response.WriteAsync(Content);
    }
}

https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNet.Mvc.Core/ActionResults/ContentResult.cs

@danroth27 danroth27 added this to the 6.0.0-beta2 milestone Oct 27, 2014
@danroth27 danroth27 modified the milestones: 6.0.0-rc1, 6.0.0-beta2 Dec 11, 2014
@ajaybhargavb
Copy link
Contributor

7c0eb56

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants