Skip to content

ConnectCallback's context.InitialRequestMessage has misleading lifetime (not tied to the Connection) #66989

@MihaZupan

Description

@MihaZupan

The ConnectCallback is provided with a SocketsHttpConnectionContext that includes the InitialRequestMessage.
By the time the callback runs, the initial request may have already been completed and returned to the user, or it is being sent by a different connection. That is, a different thread may be accessing the headers while the callback is running.

As a result, any access of InitialRequestMessage's headers is problematic.

Related: #61798, #65379

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions