Commit Graph

124 Commits

Author SHA1 Message Date
Chris Ross (ASP.NET) 612fcca729 Validate Http/2 pseudo headers #2205 #2263 #2659 2018-07-19 16:25:10 -07:00
John Luo 6551eae321 Consolidate HTTP charset validation logic 2018-07-13 16:47:28 -07:00
Stephen Halter 864cfeb2aa Merge branch 'release/2.1' into release/2.2 2018-07-12 11:18:41 -07:00
Nate McMaster 181e521b40
Fix compiler error as a result of merging 2.1.2 into release/2.1 2018-07-10 12:37:07 -07:00
Stephen Halter ac31e5ab30
[2.1.3] Consistently handle connection aborts (#2619)
* Decouple connection objects from the server (#2535)

- Making progress towards being able to use the connection objects on the client side.

* Wait for input writer to complete before calling OnConnectionClosed (#2566)

* Wait for the ConnectionClosed token to stop tracking connections (#2574)

- The prior strategy of waiting for the pipe completed callbacks doesn't work
  because blocks are returned to the memory pool after the callbacks are fired.

* Consistently handle connection resets (#2547)

* Provide better connection abort exceptions and logs

* void IConnectionDispatcher.OnConnection
2018-06-28 10:51:22 -07:00
Chris Ross (ASP.NET) 00827e38bb Harden TFM checks #2624 2018-06-07 14:56:23 -07:00
Stephen Halter 0aff4a0440
Handle client and server aborts differently from eachhother (#2612)
* Trace when app aborts connection
* Improve exception messages
* Always abort connection with ConnectionAbortedException
* Add ConnectionContext.Abort(Exception)
2018-06-01 14:42:30 -07:00
Stephen Halter b08163d3b7
[2.1.1] Use TaskCreationOptions.RunContinuationsAsynchronously a lot (#2618) 2018-05-29 16:07:41 -07:00
Stephen Halter a9d6cf13eb
Consistently handle connection resets (#2547) 2018-05-22 16:38:21 -07:00
Stephen Halter b040e33b1b Merge branch 'release/2.1' into dev 2018-05-10 23:47:51 -07:00
Stephen Halter da21fc89cf
Handle exception in SocketConnection.Shutdown() (#2562) 2018-05-10 23:39:06 -07:00
Stephen Halter e6a88c1b9c
Relieve response backpressure immediately when closing socket (#2557)
* Relieve response backpressure immediately when closing socket
2018-05-10 17:13:57 -07:00
Pavel Krymets 2f2a0047a1
React to pool cleanup (#2526) 2018-04-30 08:37:15 -07:00
John Luo 1655a8fd6d Disable writing to console if exceptions are expected 2018-04-23 14:48:15 -07:00
Chris Ross (ASP.NET) 333586d735 Clean up flaky MaxRequestBufferSize tests #2225 2018-04-17 09:11:17 -07:00
John Luo 2d51d23697 Add file logging to functional tests 2018-04-13 14:53:57 -07:00
Chris Ross (ASP.NET) 9ea2c50068 Add SNI support #2357 2018-04-04 12:49:29 -07:00
David Fowler e7d3b0c5f9
Remove KestrelThreadPool abstraction and replaced it with PipeScheduler (#2371) 2018-03-12 14:49:19 -07:00
Stephen Halter 06945ba81e Include exceptions when displaying test logs (#2346) 2018-02-24 16:51:57 -08:00
Mike Harder 4afaa386db
Remove unnecessary usings (#2326) 2018-02-16 14:04:16 -08:00
Alessio Franceschelli 9341f72b8d Consumes request before closing connection (#2314) 2018-02-14 11:46:13 -08:00
Stephen Halter 30a68dec49
Fix flakiness in address-in-use test (#2267)
* Increase test timeouts
* Use constant for default test timeout.
2018-01-24 17:42:49 -08:00
Stephen Halter f4d27e67bb
Improve server shutdown logic (#2247)
Ensure connections abort when they don't close gracefully.
2018-01-16 16:43:45 -08:00
Javier Calvarro Nelson e6bb551018 Adds support for loading the developer certificate from a pfx file
* If we can't find a developer certificate on the certificate store
  we will look for a developer certificate on the file system if a
  password has been specified for the Development certificate.
* We will look at ${APPDATA}/ASP.NET/https/<<AppName>>.pfx for windows
  and fallback to ${HOME}/.aspnet/https/<<AppName>>.pfx
* In case the password wasn't specified through configuration, the file
  is not found on the file system or can't be loaded, we won't
  do anything.
2018-01-12 16:32:06 -08:00
Chris Ross (ASP.NET) dfaf37cbba Implement config support #1290 #1879 #2016 #2166 #2167 #2188 2017-12-21 09:12:32 -08:00
Stephen Halter 668f8e3b4b
Lazily allocate protocol-specific connection objects (#2190)
* Refactor Http[12]?Connection
2017-12-04 15:59:12 -08:00
David Fowler b8a1c04ffb
Make the HttpParser a singleton (#2203)
- It's completely stateless so make it a singleton
- Fixed tests
2017-12-03 13:27:36 -08:00
Cesar Blum Silveira 8c4bdbcf6b Add "zero config" HTTPS support using local development certificate. (#2093) 2017-10-25 13:59:09 -07:00
Cesar Blum Silveira a31d1e024c Merge code paths duplicated between HTTP/1.x and HTTP/2 implementations (#2017).
- Most of the shared code is in the HttpProtocol class (former Frame)
- Virtual calls handle protocol-specific things
- Move the ProcessRequestsAsync loop to HttpProtocol
- Implement HTTP/1.x request processing in Http1Connection and HTTP/2
  in Http2Stream, with Http1Connection<T> and Http2Stream<T> subclassing
  those classes in order to handle the generic HttpContext parameter
- Split MessageBody into Http1MessageBody and Http2MessageBody,
  with MessageBody containing shared member variables and methods
2017-09-14 17:35:57 -07:00
Cesar Blum Silveira da7bc24eec Add request parsing regression tests. 2017-09-13 14:49:45 -07:00
Stephen Halter 284367db9f Improve ConnectionLimitMiddleware and connection pipeline building (#2010)
* Improve ConnectionLimitMiddleware and connection pipeline building
* Add IDecrementConcurrentConnectionCountFeature
* Flow connection features from connection middleware
2017-08-30 11:30:20 -07:00
David Fowler 5c775073a4 Initial bedrock refactoring (#1995)
- 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
2017-08-16 00:02:48 -07:00
Stephen Halter 02028b65c7 Stop using ConcurrentBag in tests for complex types (#1990)
dotnet/corefx#23068
2017-08-11 16:30:03 -07:00
Pavel Krymets 659fa967a1 Consume corefxlab packages and private build of C# compiler (#1976) 2017-08-07 13:58:19 -07:00
David Fowler 7ebbdad974 Add support for connection scopes if logging is enabled (#1953)
* Add support for connection scopes if logging is enabled
- Don't create a scope if logging isn't on
- Copied the pattern we use in Hosting
2017-07-12 11:45:08 -07:00
Cesar Blum Silveira eca4bfe6c3 Add response minimum data rate feature. 2017-07-07 22:37:25 -07:00
Nate McMaster a3c157cb61 Validate certificate EKU when it is provided 2017-07-07 11:31:06 -07:00
Nate McMaster 9b4be69e9d Do not enforce timeouts when the debugger is attached 2017-06-27 16:56:27 -07:00
Cesar Blum Silveira 3084227314 React to Testing#280. 2017-06-23 16:47:50 -07:00
Stephen Halter ea2f1033d3 Make Transport.Abstractions pubternal (#1911)
* Remove Sockets transport dependency from primary package
* Use deprecated travis images to keep systemd tests running

https://blog.travis-ci.com/2017-06-21-trusty-updates-2017-Q2-launch
2017-06-21 14:58:57 -07:00
Cesar Blum Silveira 48638cb1cd Merge branch 'rel/2.0.0-preview2' into dev 2017-06-08 15:01:34 -07:00
Cesar Blum Silveira fcc04f8c3d Add request body minimum data rate feature (#1874). 2017-06-08 14:36:03 -07:00
Pranav K 3f771ef0bc Remove usage of TaskCache (#1889)
* Remove usage of TaskCache
2017-06-08 13:47:01 -07:00
Stephen Halter f96c48c08d Add a request body size limit (#1877)
- Implement IHttpMaxRequestBodySizeFeature
2017-06-07 11:48:56 -07:00
Pavel Krymets 3c731ceb13 React to logging in DI changes (#1873) 2017-06-02 08:34:22 -07:00
Nate McMaster c343628926 Implement max connection limits
- 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.
2017-05-26 12:27:48 -07:00
Stephen Halter 6c0af445e5 Fix flaky test and improve TestServer (#1859) 2017-05-24 15:45:54 -07:00
Cesar Blum Silveira 197eb43d8a Read request body concurrent to app execution. 2017-05-22 12:23:02 -07:00
Nate McMaster 390582dcf1 Target .NET Standard 2.0 (#1849) 2017-05-20 10:37:35 -07:00
Cesar Blum Silveira 37f15bdd85 Create Frame in FrameConnection. 2017-05-10 16:48:37 -07:00