Skip to content
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
@cortex93

Description

@cortex93

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions