Commit Graph

43 Commits

Author SHA1 Message Date
Chris Ross (ASP.NET) 1d3090f056 Only reset the request body pipe for HTTP/1 #3006 2018-10-17 16:28:33 -07:00
Stephen Halter f91ae20a3c
Improve RequestAborted token handling (#2977)
- Improve test reliability of tests verifying the RequestAborted token gets tripped
- Once the response body is completed, don't fire the token for that request even if it is accessed later on.
2018-10-04 16:48:50 -07:00
Stephen Halter e9c2acf4dc
Add HTTP/2 response draining timeout (#2956)
* Move drain timeout to Http1Connection
* Add TimeoutControl class
2018-09-27 17:59:12 -07:00
David Fowler edc1935475
Flow the cancellation tokens to ReadAsync and WriteAsync (#2865) 2018-09-06 09:04:39 -07:00
John Luo 153020ef8a Allow UTF8 encoded header values 2018-08-30 16:21:34 -07:00
Stephen Halter 89f4850883
Avoid throwing the same exception instances in parallel (#2859) 2018-08-28 10:56:46 -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
John Luo 7c9e234457 Gracefully wait for streams to complete when pipe completes 2018-08-09 11:59:47 -07:00
Chris Ross (ASP.NET) ea7e53cab0 Send Resets for unhandled app exceptions #2733 2018-08-06 11:35:42 -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
Stephen Halter 603cd03bfa
Stop writing responses after the unexpected end of request content (#2734) 2018-07-19 14:18:57 -07:00
Stephen Halter f179339a79 Combine BufferWriter and CountingBufferWriter 2018-07-12 11:58:49 -07:00
Stephen Halter a826f478ad Implement HTTP/2 output flow control (#2690) 2018-07-10 14:11:59 -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
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
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 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
Ben Adams e30a02cee5 Less StringValue struct copies for header checks (#2488) 2018-04-13 18:21:50 -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 abdcb47b8f
Renames from API review (#2413)
* Renames from API review
- Rename Microsoft.AspNetCore.Protocols.Abstractions to Microsoft.AspNetCore.Connections.Abstractions.
- Renamed IConnectionHandler to IConnectionDispatcher (and related properties and types)
- Added ConnectionHandler and UseConnectionHandler extension method to Connections.Abstractions.
-  Use ActivatorUtilties to create the ConnectionHandler
2018-03-22 21:38:14 -07:00
Ben Adams 2527face16 Query EndPoints once during reset (#2398) 2018-03-15 23:55:51 -07:00
David Fowler e7d3b0c5f9
Remove KestrelThreadPool abstraction and replaced it with PipeScheduler (#2371) 2018-03-12 14:49:19 -07:00
Pavel Krymets fc80c15a65
Update to new corefx (#2369) 2018-03-08 14:23:07 -08:00
Pavel Krymets 2c108d9ba1
React to pipes in corefx (#2337) 2018-02-28 12:41:51 -08:00
Justin Wyer 83bf2375b3 #2035 Do not await OnCompleted handlers before sending the Response (#2324) 2018-02-25 18:10:04 -07:00
Ben Adams de7e2a2573 Use enum for method rather than string compares (#2294) 2018-02-23 14:29:42 -08:00
Ben Adams 6728e756b7 Sanitize and centralize exception throws (#2293)
* Sanitize and centralize exception throws
2018-02-23 09:24:20 -08:00
Ben Adams 6252ffd86a Flatten exception handling (#2313)
3 nested try blocks with 3 finallies in same function O_o
2018-02-22 16:46:18 -08:00
David Fowler 3fc69dc71f
Updated Streams to override Memory and Span overloads (#2333)
- Also plumbed Memory/Span through Kestrel over ArraySegment.
- Throw synchronously from the HttpRequestStream instead of async in some cases.
2018-02-21 00:00:46 -08:00
Alessio Franceschelli 14332c5daf Allows Content-Length for 304 Not Modified response (#2321) 2018-02-14 16:01:07 -08:00
Alessio Franceschelli 9341f72b8d Consumes request before closing connection (#2314) 2018-02-14 11:46:13 -08:00
Pavel Krymets a84095e5c3
React to pipelines changes (#2275) 2018-01-29 14:34:48 -08:00
Chris Ross (ASP.NET) 420500e2a9 #2102 Always start the response before draining the request. 2018-01-09 15:59:19 -08:00
Pavel Krymets 1fa001e7db
React to pipeline changes (#2234)
React to pipeline changes
2018-01-04 09:54:42 -08:00
BrennanConroy 95dc8824c3
Upgrade package references and react to corefx API changes (#2212) 2017-12-11 09:02:37 -08:00
Stephen Halter 668f8e3b4b
Lazily allocate protocol-specific connection objects (#2190)
* Refactor Http[12]?Connection
2017-12-04 15:59:12 -08:00
Pavel Krymets 73a37363e1
Migrate to new pipe APIs (#2124) 2017-11-13 15:04:54 -08:00
Andrew Stanton-Nurse 30010a103b Fix for #2085 - "The Detaskening" (#2123) 2017-10-23 10:52:02 -07:00
Cesar Blum Silveira 11ce1395e5 HPACK fixes and improvements. 2017-10-04 12:59:41 -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