public void should_remove_transfer_encoding_header() { var httpContext = new DefaultHttpContext(); var httpResponseMessage = new HttpResponseMessage { Content = new StringContent("") }; httpResponseMessage.Headers.Add("Transfer-Encoding", "woop"); _responder.SetResponseOnHttpContext(httpContext, httpResponseMessage).GetAwaiter().GetResult(); var header = httpContext.Response.Headers["Transfer-Encoding"]; header.ShouldBeEmpty(); }
public void should_remove_transfer_encoding_header() { var httpContext = new DefaultHttpContext(); var response = new DownstreamResponse(new StringContent(""), HttpStatusCode.OK, new List <KeyValuePair <string, IEnumerable <string> > > { new KeyValuePair <string, IEnumerable <string> >("Transfer-Encoding", new List <string> { "woop" }) }); _responder.SetResponseOnHttpContext(httpContext, response).GetAwaiter().GetResult(); var header = httpContext.Response.Headers["Transfer-Encoding"]; header.ShouldBeEmpty(); }