Commit Graph

43 Commits

Author SHA1 Message Date
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 8a74cf3ed5 Gracefully shutdown HTTP/2 connections on server and client initiated shutdown 2018-08-07 10:59:29 -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
Stephen Halter 94cfc01fbf
Implement HTTP/2 input flow control (#2740) 2018-07-27 10:47:27 -07:00
Stephen Halter 864cfeb2aa Merge branch 'release/2.1' into release/2.2 2018-07-12 11:18:41 -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 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) 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
John Luo 13663e1e15 Convert to using definitions from HeaderNames 2018-06-13 11:24:24 -07:00
Chris Ross (ASP.NET) a217206f1f Enforce max frame size #2651 2018-06-11 14:20:43 -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 9e15b2bca4
Fix PipeReader consumption pattern [2.1] 2018-05-31 11:27:38 -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
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
Mike Harder 4afaa386db
Remove unnecessary usings (#2326) 2018-02-16 14:04:16 -08:00
Pavel Krymets a84095e5c3
React to pipelines changes (#2275) 2018-01-29 14:34:48 -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
Cesar Blum Silveira 9dfffd14bb HTTP/2: support trailers. 2017-10-12 17:26:20 -07:00
Cesar Blum Silveira deed6c9780 HTTP/2: add exception error messages and log them. 2017-10-12 11:23:57 -07:00
Cesar Blum Silveira d46d2ce193 HTTP/2: validate request headers prior to starting new stream. 2017-10-10 13:12:34 -07:00
Cesar Blum Silveira 11ce1395e5 HPACK fixes and improvements. 2017-10-04 12:59:41 -07:00
Cesar Blum Silveira 1b1137b880 HTTP/2: connection error when receiving frames disallowed by stream states. 2017-10-02 10:24:57 -07:00
Cesar Blum Silveira bb9840a552 HTTP/2: do not ACK PING frames received with ACK set. 2017-09-29 16:40:01 -07:00
Cesar Blum Silveira 343ce0f01b HTTP/2: close connection with PROTOCOL_ERROR when a stream depends on itself. 2017-09-22 16:35:12 -07:00
Cesar Blum Silveira e3533885a8 HTTP/2: close connection with PROTOCOL_ERROR when receiving a frame with an even stream ID. 2017-09-21 12:26:09 -07:00
Cesar Blum Silveira a4887f4caf HTTP/2: close connection with PROTOCOL_ERROR when receiving GOAWAY frame with non-zero stream ID. 2017-09-21 11:57:31 -07:00
Cesar Blum Silveira fc56552b2a HTTP/2: close connection on PING frame with non-zero stream ID. 2017-09-21 11:23:15 -07:00
Cesar Blum Silveira 555a881cb7 HTTP/2: close connection with PROTOCOL_ERROR when an unknown frame type is interleaved with headers. 2017-09-21 11:20:52 -07:00
Cesar Blum Silveira e2af346733 HTTP/2: close the connection with PROTOCOL_ERROR when a PUSH_PROMISE frame is received. 2017-09-21 11:20:33 -07:00
Cesar Blum Silveira c8f9364e3e Expose connection features to HTTP/2 connections. 2017-09-20 11:14:15 -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
Stephen Halter 1e465e9643 Improve timeout logic 2017-09-08 12:50:01 -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
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