John Luo
62a30a731d
Fix bug in graceful shutdown
2018-08-10 00:17:29 -07:00
John Luo
cef46fdaa7
Merge branch 'johluo/more-graceful' into release/2.2
2018-08-09 12:00:36 -07:00
John Luo
7c9e234457
Gracefully wait for streams to complete when pipe completes
2018-08-09 11:59:47 -07:00
Günther Foidl
c8418c6de8
Derive SocketAwaitable from SocketAsyncEventArgs ( #2592 )
...
* SocketSenderReceiverBase as baseclass for SocketSender and SocketReceiver
* Made SocketAwaitable.GetResult inlineable
* SocketAwaitable renamed to SocketAwaitableEventArgs and inherited from SocketAsyncEventArgs
Thus saving an extra object (`SocketAwaitable`) and two int-fields, so less allocations.
2018-08-09 11:24:06 -07:00
Stephen Halter
c0557cfca7
Improve exception handling in Http2Connection.ProcessRequestsAsync ( #2787 )
2018-08-08 11:20:49 -07:00
Chris Ross (ASP.NET)
5378900e0c
Ack settings before window updates #2772
2018-08-08 11:19:23 -07:00
Chris Ross (ASP.NET)
c73d513289
Add Http2 frame logging
2018-08-08 09:46:42 -07:00
Stephen Halter
0e99235d59
Add in-memory functional test project ( #2780 )
...
- Run AddressRegistrationTests independently to avoid port conflicts
- Only run tests that verify transport behavior for each transport
2018-08-07 15:34:11 -07:00
John Luo
8a74cf3ed5
Gracefully shutdown HTTP/2 connections on server and client initiated shutdown
2018-08-07 10:59:29 -07:00
Chris Ross (ASP.NET)
ea7e53cab0
Send Resets for unhandled app exceptions #2733
2018-08-06 11:35:42 -07:00
Chris Ross (ASP.NET)
beca0259c2
Verify request Content-Length #2733
2018-08-02 13:23:57 -07:00
Stephen Halter
6d46410a76
Don't ACK ACKs ( #2767 )
2018-07-30 12:25:32 -07:00
Chris Ross (ASP.NET)
647e7c3266
Add new ConfigureKestrel extensions #2760
2018-07-27 15:25:18 -07:00
Chris Ross (ASP.NET)
c7dd9ff68a
Enable Http/2 by default #2720
2018-07-27 12:51:12 -07:00
Stephen Halter
94cfc01fbf
Implement HTTP/2 input flow control ( #2740 )
2018-07-27 10:47:27 -07:00
Nate McMaster
1f3524787e
Merge branch 'release/2.1' into release/2.2
2018-07-24 11:43:13 -07:00
Chris Ross (ASP.NET)
612fcca729
Validate Http/2 pseudo headers #2205 #2263 #2659
2018-07-19 16:25:10 -07:00
Stephen Halter
603cd03bfa
Stop writing responses after the unexpected end of request content ( #2734 )
2018-07-19 14:18:57 -07:00
David Fowler
b934e46161
Complete the transport pipes after connection middleware runs ( #2735 )
2018-07-19 11:49:46 -07:00
Chris Ross (ASP.NET)
429bcfe216
Sending and receiving RST frames. #2462
2018-07-16 09:13:11 -07:00
John Luo
6551eae321
Consolidate HTTP charset validation logic
2018-07-13 16:47:28 -07:00
Stephen Halter
f179339a79
Combine BufferWriter and CountingBufferWriter
2018-07-12 11:58:49 -07:00
Stephen Halter
864cfeb2aa
Merge branch 'release/2.1' into release/2.2
2018-07-12 11:18:41 -07:00
Nate McMaster
128eefdef3
Remove usage of the Microsoft.Extensions.Buffers.Sources package, copy the source into Kestrel
...
This moves source code that used to be in aspnet/Common. It was only used here, so this simplifies the process of working with these internal-only APIs.
cref https://github.com/aspnet/Common/pull/386
2018-07-11 22:31:23 -07:00
Stephen Halter
a826f478ad
Implement HTTP/2 output flow control ( #2690 )
2018-07-10 14:11:59 -07:00
Nate McMaster
1d9db7c25f
Merge 2.1.2 into release/2.1
2018-07-10 10:34:35 -07:00
Stephen Halter
2ab22ac55a
Merge branch 'release/2.1' into dev
2018-06-28 11:27:11 -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
John Luo
423d5432be
Add test for ensuring HPACK lowercase header names
...
- ensure lowercase mask only applied to uppercase letters
2018-06-26 10:44:21 -07:00
Chris Ross (ASP.NET)
61e16e2b31
Automation for h2spec functional tests #2640
2018-06-21 11:17:16 -07:00
Chris Ross (ASP.NET)
324565772c
Prevent app code from blocking the connection loop #2657
2018-06-20 11:06:49 -07:00
Chris Ross (ASP.NET)
c498f03cb4
Expose Tls details as a feature. #2661
...
Limit Http/2 to TLS 1.2 #2251
Bootstrap functional tests #2238
2018-06-18 16:25:18 -07:00
Stephen Halter
14f020cf11
Improve tracking of connection lifetime ( #2646 )
2018-06-15 11:10:38 -07:00
John Luo
13663e1e15
Convert to using definitions from HeaderNames
2018-06-13 11:24:24 -07:00
Nate McMaster
ff3f0e905d
Merge branch 'release/2.1' into release/2.1.2
2018-06-12 14:16:29 -07:00
Chris Ross (ASP.NET)
a217206f1f
Enforce max frame size #2651
2018-06-11 14:20:43 -07:00
Chris Ross (ASP.NET)
810a302e66
Disable AllowRenegotiation for HTTP/2
2018-06-11 13:51:23 -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
aa9b9ca724
Merge branch 'release/2.1' into dev
2018-05-31 16:29:14 -07:00
Stephen Halter
e4d290b601
Fix Json regression in Socket Transport ( #2578 )
2018-05-31 16:28:25 -07:00
Stephen Halter
d1416e679b
[2.1.1] Provide clearer exception message for breaking change ( #2623 )
...
- In 2.1, the default transport (Sockets) can no longer bind to certain
endpoint types (Unix domain sockets and open socket handles).
- The new message recommends manually selecting the libuv transport
to work around this issue.
2018-05-31 15:45:26 -07:00
Stephen Halter
af177c5adc
Add Memory<byte> overloads to HttpUpgradeStream ( #2622 )
2018-05-31 15:44:39 -07:00
Stephen Halter
9e15b2bca4
Fix PipeReader consumption pattern [2.1]
2018-05-31 11:27:38 -07:00
Chris Ross (ASP.NET)
7e43d35049
Make ListenOptions.Protocols public again for HTTP/2 work
2018-05-30 12:25:38 -07:00
Stephen Halter
f80091a328
Merge branch 'release/2.1' into dev
2018-05-29 16:37:16 -07:00
Stephen Halter
5ec7bacdfe
Lower severity of AuthenticationException logs from SslStream handshake ( #2614 )
2018-05-29 16:27:16 -07:00
Stephen Halter
a9d6cf13eb
Consistently handle connection resets ( #2547 )
2018-05-22 16:38:21 -07:00
Pavel Krymets
27799b5acb
Enable pubternability analyzer ( #2560 )
2018-05-16 13:42:56 -07:00
Stephen Halter
f8f6f39f55
Wait off the ConnectionClosed token to stop tracking ConnectionCallback ( #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.
2018-05-15 12:38:35 -07:00
Stephen Halter
c683316253
Generate repetitive TransportConnection FeatureCollection code ( #2548 )
2018-05-14 17:20:48 -07:00
John Luo
04f2101696
Reenable api check
2018-05-14 13:36:39 -07:00
Stephen Halter
514917b9a8
Wait for input writer to complete before calling OnConnectionClosed ( #2566 )
2018-05-14 11:51:49 -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
Stephen Halter
f04118fca1
Merge branch 'halter73/merge-2.1-dev' into dev
2018-05-09 17:27:47 -07:00
Pranav K
80fa1d699d
Upgrade to netcoreapp2.2
...
This reverts commit fe9da3c57b .
2018-05-09 16:43:15 -07:00
Ryan Brandenburg
fe9da3c57b
Revert "Don't touch product repos"
...
This reverts commit 8e9f05b902 .
2018-05-08 16:52:48 -07:00
Ryan Brandenburg
8e9f05b902
Don't touch product repos
2018-05-08 15:38:20 -07:00
Ryan Brandenburg
350310aa96
Handle netcoreapp cases
2018-05-08 15:38:20 -07:00
Stephen Halter
c8d374af64
Merge branch 'release/2.1' into dev
...
# Conflicts:
# build/dependencies.props
# korebuild-lock.txt
# src/Kestrel.Transport.Libuv/Internal/LibuvConnectionContext.cs
2018-05-07 15:47:20 -07:00
Nate McMaster
05d68efbae
Merge branch 'release/2.1.0-rc1' into release/2.1
2018-05-07 14:35:41 -07:00
Stephen Halter
5c17bff55d
Don't throw on FIN from upgraded connections ( #2533 )
...
* Allow app to drain request buffer after FIN
2018-05-04 16:21:07 -07:00
Stephen Halter
8b1fbad10e
Don't complete KestrelServer.StopAsync task inline ( #2534 )
2018-05-03 17:01:36 -07:00
David Fowler
b23d9b7679
Decouple connection objects from the server ( #2535 )
...
- Making progress towards being able to use the connection objects on the client side.
2018-05-01 12:01:24 -07:00
Pavel Krymets
2f2a0047a1
React to pool cleanup ( #2526 )
2018-04-30 08:37:15 -07:00
Pavel Krymets
6f2f496c3d
React to splitting memory pool ( #2521 )
2018-04-24 14:11:47 -07:00
Stephen Halter
b0e1fa5e30
Fix connection abort
2018-04-23 17:01:49 -07:00
Stephen Halter
6fd09af374
Improve logging of request drain timeout ( #2480 )
2018-04-16 11:53:10 -07:00
Andrew Stanton-Nurse
3a45136cc4
make IConnectionInherentKeepAliveFeature a boolean feature ( #2496 )
2018-04-16 11:34:06 -07:00
Ben Adams
e30a02cee5
Less StringValue struct copies for header checks ( #2488 )
2018-04-13 18:21:50 -07:00
John Luo
2d51d23697
Add file logging to functional tests
2018-04-13 14:53:57 -07:00
Stephen Halter
10f3b6863e
Avoid nullref in KestrelEventSource ( #2483 )
...
* Avoid nullref in KestrelEventSource
* Improve HostNameIsReachableAttribute to speed up test discovery
2018-04-12 17:29:34 -07:00
Chris Ross (ASP.NET)
ee12c4fcf2
Downgrade HTTPs handshake failures to debug #1853
2018-04-12 09:25:44 -07:00
Chris Ross (ASP.NET)
c6fa9793eb
Make Protocols internal
2018-04-12 08:53:27 -07:00
David Fowler
ca44b4adfc
Moved kestrel specific features into transport abstractions ( #2482 )
2018-04-11 20:23:48 -07:00
David Fowler
f6b2880369
Flow the ConnectionContext to the SNI callback ( #2478 )
2018-04-11 15:56:25 -07:00
Sébastien Ros
e8bb88cb58
Fixing typo ( #2477 )
2018-04-11 14:27:53 -07:00
David Fowler
b030ab7e49
Update Connections.Abstractions.csproj ( #2473 )
2018-04-09 17:55:14 -07:00
David Fowler
4760cce6aa
Remove IConnection ( #2472 )
2018-04-07 18:55:59 -07:00
Chris Ross (ASP.NET)
2ee0d6e337
Delay loading the dev cert #2422
2018-04-04 14:54:27 -07:00
Chris Ross (ASP.NET)
953496a970
Merge branch 'release/2.1' into dev
2018-04-04 13:44:56 -07:00
Chris Ross (ASP.NET)
9ea2c50068
Add SNI support #2357
2018-04-04 12:49:29 -07:00
Andrei Amialchenia
70ce044778
Corrects spelling of some comments ( #2461 )
2018-04-03 15:55:17 -07:00
Pavel Krymets
ba06c58bcb
Merge release/2.1 into dev ( #2460 )
2018-04-03 10:45:31 -07:00
Stephen Halter
623c27ab01
Dispose SocketAsyncEventArgs when we dispose the Socket ( #2459 )
2018-04-02 19:48:17 -07:00
Pavel Krymets
ba2b883db0
Reaction to *Memory changes ( #2446 )
2018-04-02 16:44:13 -07:00
David Fowler
6b183c5ac0
Use 4K as the minimum segment size ( #2452 )
...
- This normalizes the behavior for kestrel no matter what memory pool implementation is used. The transports should behave the same (ask for 1/2 full blocks) across pool implementations.
- Declare the minimum segment size in KestrelMemoryPool
- Updated the AdaptedPipeline to use MinimumSegmentSize / 2
2018-04-02 16:14:40 -07:00
David Fowler
a37fa83aee
Fixed a parser bug found when trying out the array pool ( #2450 )
...
- When using the array pool, we get terrible block density and as a result
the header parser was failing.
- This fixes the case where the parser needed to skip 2 blocks at the end
(which is unrealistic). Comparing the current index to the reader index is incorrect
since we may end up at the same index in another segment.
2018-04-01 00:04:02 -07:00
David Fowler
7382198356
Copy connection middleware when using ListenLocalHost ( #2447 )
...
- Connection middleware got removed during Clone when using ListenLocalhost
2018-03-31 07:29:35 -07:00
Andrew Stanton-Nurse
2c2a8dae01
Merge pull request #2445 from aspnet/release/2.1
...
Add IConnection to Connections.Abstractions (#2444 )
2018-03-30 15:21:48 -07:00
David Fowler
67cb8a0e11
Add IConnection to Connections.Abstractions ( #2444 )
2018-03-30 15:20:31 -07:00
David Fowler
46ab09ca36
Merge branch 'release/2.1' into dev
2018-03-27 02:08:35 -07:00
David Fowler
be04ccac6e
Move DuplexPipe into Kestrel.Core as internal ( #2428 )
2018-03-27 02:02:15 -07:00
Stephen Halter
68ff406862
Merge branch 'release/2.1' into dev
2018-03-26 14:51:21 -07:00
Stephen Halter
a1de323ff4
Make LibuvTransport(Factory) pubternal ( #2426 )
2018-03-26 11:39:51 -07:00
David Fowler
f0629dcbe4
Merge branch 'release/2.1' into dev
2018-03-24 03:14:59 -07:00
David Fowler
6701339835
Expose DefaultConnectionContext POCO ( #2421 )
...
- Made TransportConnecton derive from ConnectionContext
- Less objects, less opinions about what the ConnectionContext is. This diverges from what we do with HttpContext but it seems better overall.
- Made DefaultConnectionContext
- Usable for unit testing
- Usable for benchmarking
2018-03-24 03:12:53 -07:00
John Luo
2dc1858f90
Merge branch 'release/2.1' into dev
2018-03-23 16:02:42 -07:00