* Renames from API review
- Rename Microsoft.AspNetCore.Protocols.Abstractions to Microsoft.AspNetCore.Connections.Abstractions.
- Renamed IConnectionHandler to IConnectionDispatcher (and related properties and types)
- Added ConnectionHandler and UseConnectionHandler extension method to Connections.Abstractions.
- Use ActivatorUtilties to create the ConnectionHandler
- Always add the TlsConnectionFeature when the HttpsConnectionAdapter runs
- Implemented the ITlsApplicationProtocolsFeature on the existing TlsConnectionFeature
- Removed Kestrel.Tls
* Make Sockets the default transport
* Create separate Libuv and Sockets functional test projects
* Fix functional tests that fail with Sockets
* Moved OneToTenThreads test to Kestrel.Transport.Libuv.Tests
* Fix systemd activation tests to use libuv transport
* Dispose Sockets PipeFactory
* Improve Socket's server-side abort handling
* Add explicit rebinding test
PackageLineup is a way to manage PackageReference versions across large projects. It removes the version information from the repository and instead pulls the information from an external "lineup" file.
What works:
- HTTP/2 over TLS1.2 with ALPN
- Request and response flow
- Headers are compressed and decompressed with HPACK
- Request body can be read by streams (if present)
- MVC template app with individual auth works fine
- PRIORITY frames are validated
- RST_STREAM frames are validated and abort streams
- SETTINGS frames are validated and ACKed
- PING frames are validated and ACKed
- GOAWAY frames stop connections
- WINDOW_UPDATE frames are validated
- CONTINUATION frames are sent for large header blocks
What doesn't work yet:
- Flow control in either direction
- It's not possible to encode a single header across more than one frame
- Affects only a very large header (name and value combined ~16KB long)
- Request trailers
- Response trailers
- Limits and timeouts in `KestrelServerLimits` are not enforced on HTTP/2
- HPACK use is very limited on the send side
- Literals are not Huffman-encoded
- Common headers (e.g. "server: Kestrel") are never indexed
- Honoring client settings
- Some error checking is still missing (e.g. validating incoming frame size)
- Added Protocols.Abstractions
- IConnectionHandler.OnConnection takes an IFeatureCollection instead of
IConnectionInfo
- Removed IConnectionContext and IConnectionInformation replaced with
IConnectionTransportFeature
- Updated FrameConnectionContext and FrameContext to have the relevant
state instead of flowing the ConnectionInformation.
- Updated tests
* Refactoring and of FrameConnection and Frame
- Building on top of the last refactoring of FrameConnection, this change aims to clean up
the communication between the Frame and FrameConnection by removing some concepts and
being consistent about the communication between Frame and FrameConnection with or without
connection adapters. Changes include:
- Removing ConnectionLifetimeControl, ISocketOutput, StreamSocketOutput
- Moving more initialization of the frame to FrameConnection after the pipes
are setup
- OutputProducer communicates cancellation via the IPipeWriter instead of the output's IPipeReader.
- Frame always communicates via the pipes and that communications flows through the layers to the transport.
This means that each 1/2 of the adapted pipeline handles closing the right side of the transport at the
right time, propagating exceptions as necessary.
- This is how the flow looks now:
-> ->
[transport] [connection adapters] [frame]
<- <-
- Transports need to handle a ConnectionAbortedException on the output as a signal to stop
writing and end the connection. This will no longer try to drain the output but will just stop
writing and end the response immediately.
- Remove frame.Abort when cancellation on Write fails.
- Unify the connection shutdown logic
- Dispose 1/2 initialized connection adapters
#1815
- This change adds the initial socket transport for Kestrel, all of the tests pass but there are still
a couple of things that aren't done yet.
- The functional tests support running both on both transports but tests aren't running for sockets right now. We need to parameterize these.
- TimeoutServerTests hard code the libuv transport, this needs to support any transport.
- There is no handling of connection stopping on application shutdown. This is being implemented in kestrel core so transports don't need to handle it. Sockets won't be the default transport until that is the case.
- Performance needs to be looked at, today the SocketTransport doesn't dispatch by default and we're not buffering in kestrel.core, this can hurt as the number of kernel calls map 1:1 with application writes.
* Rename EngineTests to LibuvTransportTests.
* Move libuv-specific tests into their own test project.
* Move LibuvOutputConsumerTests.AllocCommitCanBeCalledAfterConnectionClose to new OutputProducerTests class and rename it to WritesNoopAfterConnectionCloses.
* Remove TransportContext from TestServiceContext.
* Make KestrelTests depend on Kestrel.Core only.
* Rename Microsoft.AspNetCore.Server.Kestrel.KestrelTests to Microsoft.AspNetCore.Server.Kestrel.Core.Tests.
* Add Microsoft.AspNetCore.Server.Kestrel.Tests test project for WebHostBuilderKestrelExtensionsTests.
* Increase socket receive timeout in MaxRequestBufferSizeTests to mitigate flakiness.
* Anything using TestServer should be a functional test.
* Move out of LibuvTransportTests tests that are not specific to LibuvTransport.
- Move to RequestTests:
- Http11 (rename to Http11KeptAliveByDefault)
- Http10ContentLength (rename to Http10NotKeptAliveByDefault)
- Http10KeepAlive
- Http10KeepAliveNotUsedIfResponseContentLengthNotSet (rename to Http10KeepAliveNotHonoredIfResponseContentLengthNotSet)
- Http10ContentLengthKeepAlive (rename to Http10KeepAliveHonoredIfResponseContentLengthSet)
- Expect100ContinueForBody (rename to Expect100ContinueHonored)
- ZeroContentLengthAssumedOnNonKeepAliveRequestsWithoutContentLengthOrTransferEncodingHeader
- ConnectionClosesWhenFinReceivedBeforeRequestCompletes (test was actually not marked as Theory, and was incorrect)
- RequestsCanBeAbortedMidRead
- RequestHeadersAreResetOnEachRequest
- UpgradeRequestIsNotKeptAliveOrChunked
- HeadersAndStreamsAreReused (rename to HeadersAndStreamsAreReusedAcrossRequests)
- Move to ResponseTests:
- Http10RequestReceivesHttp11Response (rename to Http11ResponseSentToHttp10Request)
- ZeroContentLengthSetAutomaticallyAfterNoWrites
- ZeroContentLengthSetAutomaticallyForNonKeepAliveRequests
- ZeroContentLengthNotSetAutomaticallyForHeadRequests
- ZeroContentLengthNotSetAutomaticallyForCertainStatusCodes
- ConnectionClosedAfter101Response
- ThrowingResultsIn500Response
- ThrowingAfterWritingKillsConnection
- ThrowingAfterPartialWriteKillsConnection
- ThrowingInOnStartingResultsInFailedWritesAnd500Response
- ThrowingInOnCompletedIsLoggedAndClosesConnection
- FailedWritesResultInAbortedRequest
- NoErrorsLoggedWhenServerEndsConnectionBeforeClient
- NoResponseSentWhenConnectionIsClosedByServerBeforeClientFinishesSendingRequest
- ResponseHeadersAreResetOnEachRequest
- OnStartingCallbacksAreCalledInLastInFirstOutOrder
- OnCompletedCallbacksAreCalledInLastInFirstOutOrder
- Remove:
- RePathEscapeTests (theory data to HttpParsingData)
- ReDisconnectingClient (what was that testing?)
- Changed socket output to be based on pipelines
- Changed connection filter glue to be based on pipelines
- Codegen that used `MemoryPoolIterator` for output now uses `WritableBuffer`
- Made `UvWriteReq` async/await friendly with `LibuvAwaitable<T>`
- Deleted MemoryPool and friends
Remove runtimeconfig.template.json
Remove ToolsVersion attribute
Use repo.targets instead of makefile.shade
Rename code gen app to shorter name
Use GetOSPlatform task
Upgrade tests to .NET Framework 4.5.2
Cleanup solution configurations. Set the class libraries to AnyCPU even when on the x86 or x64 solution config.
- Change most tests to use dynamic ports, rather than a fixed port obtained from GetNextPort().
- Add several new cases to `AddressRegistrationTests` and `ServerAddressFacts`.
- Remove project `test\Microsoft.AspNetCore.Server.Kestrel.TestCommon`. It's not longer needed, since only `AddressRegistrationTests` uses `GetNextPort()`.