aspnetcore/test/Microsoft.AspNetCore.Http.T...
David Fowler 0f4f1950f1
Attempt to make it easier to detect when the request is done (#1021)
- Today the async local reference to the HttpContext flows when the execution context is captured. When the http request has ended, the HttpContext property will return the reference to an invalid HttpContext instead of returning null. This change stores both the request id and the HttpContext and makes sure both match before returning anything valid.
- This is still racy but should catch more cases of people doing bad things.
- There will still be issue if people store the context in a local and use that reference instead of accessing it through the property getter but we can live with that.
- Set the TraceIdentifier to null in the default HttpContextFactory
- Added tests
2018-06-26 11:49:12 -07:00
..
Authentication
Features
Internal Add BindingAddress to HttpAbstractions (#977) 2017-12-18 18:40:11 -08:00
DefaultHttpContextTests.cs Upgrade to xunit 2.3.0-beta4 2017-08-22 16:29:13 -07:00
HeaderDictionaryTests.cs Implement read-only HeaderDictionary (#958) 2017-11-06 20:03:49 -08:00
HttpContextAccessorTests.cs Attempt to make it easier to detect when the request is done (#1021) 2018-06-26 11:49:12 -07:00
HttpContextFactoryTests.cs Attempt to make it easier to detect when the request is done (#1021) 2018-06-26 11:49:12 -07:00
HttpServiceCollectionExtensionsTests.cs Add helper to register IHttpContextAccessor (#947) 2017-10-02 08:31:12 -07:00
Microsoft.AspNetCore.Http.Tests.csproj Update samples and tests to target netcoreapp2.1 2017-11-13 15:13:10 -08:00
RequestCookiesCollectionTests.cs
ResponseCookiesTest.cs Minor test code changes to resolve xUnit2013 build error 2017-10-05 17:13:26 -07:00