Closed benaadams closed 5 years ago
Change the HttpContextFactory to not set the TraceIdentifier to null. Also tweak some of these tests https://github.com/aspnet/HttpAbstractions/pull/1021/files to avoid the TraceIdentifier comparison
It's an extra allocation per request but async locals aren't super light anyways so this is fine.
Use an extra level of indirection in
HttpContextAccessor
so what is being held onto is shared (rather than its own reference); so when the request is done that second indirection can be cleared for everything holding on toHttpContextHolder
at which point it will remain inert and they won't see data for the next request (as a newHttpContextHolder
will be created)