If a user tries to host a message handler like this with OWIN:
public class MyHandler : HttpMessageHandler
{
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
var response = new HttpResponseMessage(HttpStatusCode.OK);
response.Content = new StreamContent(new MemoryStream(Encoding.UTF8.GetBytes("foo bar")));
response.Headers.TransferEncodingChunked = true;
return Task.FromResult<HttpResponseMessage>(response);
}
}
The response gets sent with a content-length instead of being sent chunked. We should respect the intent.
Comments: Fixed: https://aspnetwebstack.codeplex.com/SourceControl/changeset/226c5633f1bad1c415e14d85579ccd87743a31a3
public class MyHandler : HttpMessageHandler
{
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
var response = new HttpResponseMessage(HttpStatusCode.OK);
response.Content = new StreamContent(new MemoryStream(Encoding.UTF8.GetBytes("foo bar")));
response.Headers.TransferEncodingChunked = true;
return Task.FromResult<HttpResponseMessage>(response);
}
}
The response gets sent with a content-length instead of being sent chunked. We should respect the intent.
Comments: Fixed: https://aspnetwebstack.codeplex.com/SourceControl/changeset/226c5633f1bad1c415e14d85579ccd87743a31a3