- Added new options to allow configuring the maximum number of concurrent connections and upgraded connections.
- `KestrelServerLimits.MaxConcurrentConnections` defaults unlimited.
- `KestrelServerLimits.MaxConcurrentUpgradedConnections` defaults to unlimited.
- Calls to IHttpUpgradeFeature.UpgradeAsync() will throw when the MaxConcurrentUpgradedConnections limit has been reached.
- Kestrel will close new connections without response when MaxConcurrentConnections is reached.
After upgrade has been accepted by the server:
- Reads to HttpRequest.Body always return 0
- Writes to HttpResponse.Body always throw
- The only valid way to communicate is to use the stream returned by IHttpUpgradeFeature.UpgradeAsync()
Also, Kestrel returns HTTP 400 if requests attempt to send a request body along with Connection: Upgrade