Commit Graph

32 Commits

Author SHA1 Message Date
Chris Ross (ASP.NET) dfaf37cbba Implement config support #1290 #1879 #2016 #2166 #2167 #2188 2017-12-21 09:12:32 -08:00
Chris Ross (ASP.NET) d505d20ba7 Merge Kestrel.Https into Kestrel.Core. Fix sample. 2017-12-18 14:08:14 -08:00
Stephen Halter 9f02935074
Call Listen after Bind in tests (#2221) 2017-12-15 12:45:32 -08:00
Chris Ross (ASP.NET) 89d1862f21 #2139 Add ListenLocalhost and ListenAnyIP 2017-11-16 16:14:17 -08:00
Pranav K 186e9806cd Update samples and tests to target netcoreapp2.1 2017-11-16 14:43:15 -08:00
Stephen Halter 53b4697269
Show cause of connection failure in test (#2155) 2017-11-09 16:56:08 -08:00
Cesar Blum Silveira 8c4bdbcf6b Add "zero config" HTTPS support using local development certificate. (#2093) 2017-10-25 13:59:09 -07:00
Andrew Stanton-Nurse 1678c54291 Add some tracing and increase timeout for flaky test (#2130) 2017-10-25 11:56:43 -07:00
Andrew Stanton-Nurse 7d205d1093 add event names to Logging messages (#2132) 2017-10-25 11:27:05 -07:00
Stephen Halter 66a3c9496a Set SO_REUSEADDR on managed listen sockets on Unix (#2111)
- https://github.com/dotnet/corefx/issues/24562
2017-10-12 12:26:52 -07:00
Stephen Halter fdb4184dbf Sockets transport (#2100)
* 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
2017-10-11 15:14:35 -07:00
Stephen Halter 83e2084368 Fix flaky MaxRequestBodySizeTest (#2092)
- Don't attempt to send any data after the request might already be rejected.
2017-10-03 14:34:14 -07:00
Cesar Blum Silveira 551c1ebc0b Configure enabled protocols per endpoint and add HTTP/2 w/ prior knowledge support (#2067). 2017-09-27 10:14:39 -07:00
Cesar Blum Silveira 91eb4cd54c Fix flakiness in KeepAliveTimeoutTests.ConnectionKeptAliveBetweenRequests (#1684). 2017-09-18 15:12:13 -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 d28b413390 Add tracing to KeepAliveTimeoutTests.ConnectionKeptAliveBetweenRequests to investigate test failures. 2017-09-14 16:55:44 -07:00
Cesar Blum Silveira da7bc24eec Add request parsing regression tests. 2017-09-13 14:49:45 -07:00
Stephen Halter 1e465e9643 Improve timeout logic 2017-09-08 12:50:01 -07:00
Cesar Blum Silveira 66d8e8198d Re-enable TestKeepAliveTimeout. 2017-09-07 17:24:33 -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 7854c0604a Remove the events on ConnectionContext (#2023)
- Use the pipe events and removed the Tasks from ConnectionContext
- Remove OnConnectionClosed from FrameConnection. Since the `FrameConnetion` is a single middleware, not the entire pipeline, we shouldn't need to wait on the connection close there.
- It seems like the callbacks are rooted on the pipe even after they fire. This needs to be investigated in pipelines.
2017-08-26 20:19:55 -07:00
Cesar Blum Silveira a145734d43 Fix flakiness in ConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate (#1955). 2017-08-24 10:17:05 -07:00
David Fowler 2e6687031d Added initial connection middleware pipeline (#2003)
* Added initial connection middleware pipeline
- Implemented IConnectionBuilder on ListenOptions. Kept IConnectionAdapter for now.
- Delay the configure callback for ListenOptions until the server has started.
- Added ConnectionLimitMiddleware and HttpConnectionMiddleware
- Expose ConnectionAborted and ConnectionClosed on ConnectionContext and
IConnectionTransportFeature
- Updated the tests
- Removed IConnectionApplicationFeature
- Moved Application to IConnectionTransportFeature
2017-08-21 12:11:27 -07:00
Nate McMaster 26f1d4baa3 Use PackageLineup
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.
2017-08-16 14:10:43 -07:00
Cesar Blum Silveira 0fafd19ec9 Initial HTTP/2 support.
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)
2017-08-16 10:04:44 -07:00
Nate McMaster c10ac85cf2 Add fixes for problems discovered by xunit.analyzers (#1999)
* Add fixes to tests for problems discovered by xunit.analyzers 0.6.1

* PR feedback. Add comments about why we have a #pragma
2017-08-16 09:37:49 -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
Nate McMaster d3fb5e76f1 Remove dependency on a custom task to detect when compiling on macOS (#1987)
MSBuild.IsOSPlatform is new to MSBuild 15.3 and can be used to determine when we are building on macOS.
2017-08-09 16:48:02 -07:00
Pavel Krymets 659fa967a1 Consume corefxlab packages and private build of C# compiler (#1976) 2017-08-07 13:58:19 -07:00
Cesar Blum Silveira d68f8165e1 Disable test ConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate on Linux. 2017-08-04 17:45:07 -07:00
Nate McMaster 6584a8b5fd Shorten folder names
Remove the Microsoft.AspNetCore.Server prefix from csproj and their folders. This is required to help us avoid max path issues on Windows.
2017-07-28 11:11:55 -07:00