Commit Graph

2017 Commits

Author SHA1 Message Date
Stephen Halter fc3c2eef5e
Handle SocketError.ProtocolType as a connection reset on macOS (#2845)
* Handle SocketError.ProtocolType as a connection reset on macOS
* Make IsConnectionResetError and IsConnectionAbortError stricter
2018-08-23 19:16:44 -07:00
Stephen Halter e5a1101239
Improve exception handling in SocketConnection (#2844)
- Avoid race where a connection reset observed by both DoSend() and DoReceive()
  resulted in a ConnectionAbortedException being thrown from the input Pipe
  instead of a ConnectionResetException.
2018-08-23 16:59:02 -07:00
David Fowler 68a0863524
General connection management (#2834)
This change makes the handling of graceful shutdown work for more than just http scenarios. This should allow us to move TLS further out and should also allow us to start moving things to connection middleware instead of connection adapters.
Summary of the things changed/added:
- Added IConnectionLifetimeNotificationFeature that represents an attempt to gracefully close the connection that isn't being aborted. This feels pretty awful but we may have to do it.
- Moved connection management to the ConnectionDispatcher and out of the HttpConnectionMiddleware
- Removed Http from the names of the ConnectionManager and Heartbeat
2018-08-22 20:35:28 -07:00
David Fowler 0b471f2b2f Sockets: do 0 byte reads to avoid allocating memory for idle connections
- Do not do 0 byte reads on OSX due to potential sockets bug
2018-08-21 18:07:15 -07:00
ASP.NET CI 912c36a6e0 Update package branding for 2.2.0-preview2 2018-08-21 13:33:51 -07:00
John Luo 74f4387807 Remove default port tests 2018-08-20 15:54:41 -07:00
John Luo 6f7a841374 Fire OnStreamCompleted after all pipes are closed 2018-08-17 17:45:47 -07:00
Chris Ross (ASP.NET) aa9dde2457 Extract bitshift helper code, Frame cleanup #2773 2018-08-17 15:48:16 -07:00
Chris Ross (ASP.NET) ff52525134 Skip ContentLength_Received_MultipleDataFramesOverSize_Reset 2018-08-17 15:44:19 -07:00
David Fowler 83488886e0
Clean up some remants of the past (#2827)
- Remove Application from HttpConnectionContext and Http*ConnectionContext (it's no longer required)
2018-08-15 23:41:32 -07:00
Stephen Halter 5becb72107
Improve test logs (#2826)
- Include hosting logs in some tests that where previously missing them
- Prevent duplicate logs from Mock CallBase an CompositeKestrelTrace
- Log ports used by transport functional tests
- Add file logging to HTTP/2 "unit" tests
2018-08-15 18:31:56 -07:00
Chris Ross (ASP.NET) 0c2923135b Limit concurrent HTTP/2 Streams per connection #2815 2018-08-15 15:58:57 -07:00
Chris Ross (ASP.NET) 43398482a5 Implement MaxRequestBodySize for HTTP/2 #2810 2018-08-13 12:06:21 -07:00
Stephen Halter cd6de2fa18
Improve HTTP/2 stream abort logic (#2819)
- Fix race where headers frame could be written after an abort was observed
- Fix Http2StreamTests to verify expected abort-related exceptions
2018-08-13 11:45:17 -07:00
ASP.NET CI 2bbd890357 Update dependencies.props
[auto-updated: dependencies]
2018-08-12 19:20:00 +00:00
John Luo 62a30a731d Fix bug in graceful shutdown 2018-08-10 00:17:29 -07:00
Stephen Halter bd3a8a3511 Small test fix to avoid potential flakiness 2018-08-09 12:12:24 -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 aaf0293ebc
Fix logging verification in tests (#2795) 2018-08-08 17:16:08 -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
John Luo 0a28806c17 Fix flaky graceful shutdown tests 2018-08-07 15:40:38 -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 b494e50353 Fixup shutdown functional tests 2018-08-07 11:50:09 -07:00
John Luo 8a74cf3ed5 Gracefully shutdown HTTP/2 connections on server and client initiated shutdown 2018-08-07 10:59:29 -07:00
ASP.NET CI a93a3d77cb Update dependencies.props
[auto-updated: dependencies]
2018-08-06 20:42:59 +00:00
Chris Ross (ASP.NET) ea7e53cab0 Send Resets for unhandled app exceptions #2733 2018-08-06 11:35:42 -07:00
ASP.NET CI 7e073cb5f6 Update dependencies.props
[auto-updated: dependencies]
2018-08-05 19:20:23 +00:00
Chris Ross (ASP.NET) beca0259c2 Verify request Content-Length #2733 2018-08-02 13:23:57 -07:00
Stephen Halter 3cdb73440e
Disable memory pool late return validation in H2SpecTests (#2768)
- We should reenable once HTTP/2 graceful shutdown is implemented
2018-07-30 14:33:45 -07:00
Stephen Halter 6d46410a76
Don't ACK ACKs (#2767) 2018-07-30 12:25:32 -07:00
ASP.NET CI 47e643f20a Update dependencies.props
[auto-updated: dependencies]
2018-07-29 12:18:16 -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
Eilon Lipton a104adeca3
Update CONTRIBUTING.md 2018-07-24 10:51:39 -07:00
ASP.NET CI 2365f2a7a3 Update dependencies.props
[auto-updated: dependencies]
2018-07-22 12:18:40 -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
Stephen Halter a44007adfb
Fix deadlock in GOAWAY_Received_RelievesConnectionBackpressure (#2724) 2018-07-16 10:55:20 -07:00
Stephen Halter 5f065b6670
Fix deadlock in GOAWAY_Received_RelievesConnectionBackpressure (#2724) 2018-07-16 10:55:09 -07:00
Chris Ross (ASP.NET) 429bcfe216 Sending and receiving RST frames. #2462 2018-07-16 09:13:11 -07:00
ASP.NET CI d744c177b7 Update dependencies.props
[auto-updated: dependencies]
2018-07-15 12:19:14 -07:00
John Luo 6551eae321 Consolidate HTTP charset validation logic 2018-07-13 16:47:28 -07:00
Nate McMaster 85bf01da82
Pin version variables to the ASP.NET Core 2.1.2 baseline
This reverts our previous policy of cascading versions on all servicing updates.
This moves variables into the 'pinned' section, and points them to the latest
stable release (versions that were used at the time of the 2.1.2 release).
2018-07-12 19:54:51 -07:00