public async Task Environment_should_contain_content_length_header()
{
OwinContext owinContext = null;
var handler = new OwinHttpMessageHandler(env =>
{
owinContext = new OwinContext(env);
return Task.FromResult(0);
});
using (var client = new HttpClient(handler))
{
var stringContent = new StringContent("hello");
await client.PostAsync("http://localhost/", stringContent);
}
owinContext.Request.Headers.ContainsKey("Content-Length").ShouldBeTrue();
}
}