This repository was archived by the owner on Dec 19, 2018. It is now read-only.
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
TestServer should call IHttpContextFactory.Create with valid featureCollection #896
Closed
Description
Hi,
I'm trying to set the TraceIdentifier from request headers early in the request processing before HostingApplication begins the scope and logs it.
To do so, I’m reading HttpContext.Request.Headers in a custom HttpContextFactory.Create method. While it works with Kestrel, it doesn't with TestServer.
From what I understand, TestServer do not populate HttpContext from the IFeatureCollection but it calls IHttpApplication.CreateContext with a fake RequestFeature and modify the returned HttpContext before calling IHttpApplication.ProcessRequestAsync.
If that's not a bug, what is the correct usage and how could I achieve my requirement