-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Add IPersistentStateFeature #34360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IPersistentStateFeature #34360
Conversation
src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.FeatureCollection.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any feedback beyond stephens.
src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/tools/CodeGenerator/ReadOnlySpanStaticDataGenerator.cs
Show resolved
Hide resolved
src/Servers/Kestrel/tools/CodeGenerator/TransportMultiplexedConnectionFeatureCollection.cs
Outdated
Show resolved
Hide resolved
@@ -27,6 +28,7 @@ public static string GenerateFile() | |||
"IConnectionIdFeature", | |||
"IConnectionTransportFeature", | |||
"IConnectionItemsFeature", | |||
"IPersistentStateFeature", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should handle this more like the IConnectionSocketFeature, and implement this for QuicStreamContext only, since we don't pool SocketConnections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't pool SocketConnections, but because SocketConnections implements this feature it is consistently available from HTTP requests.
HTTP/2 - Implemented on Http2Stream
HTTP/3 - Implemented on QuicStreamContext
HTTP/1.1 - Implemented on SocketConnection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @halter73
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather this not be implemented by transports it's not supported on. We should implement this on Http1Connection, not SocketConnection, similarly to how you implement it in Http2Stream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
1560b51
to
7834169
Compare
f97debe
to
3de7460
Compare
src/Servers/Kestrel/shared/TransportConnection.FeatureCollection.cs
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
private void InitiaizeFeatures() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private void InitiaizeFeatures() | |
private void InitializeFeatures() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I blame someone else 🐴
aspnetcore/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketConnection.FeatureCollection.cs
Line 13 in 52eff90
private void InitiaizeFeatures() |
3c0bb12
to
f129cd6
Compare
Fixes #6895
Also unblocks HTTP/3 stream caching on the QUIC transport.