Commit Graph

26 Commits

Author SHA1 Message Date
Pavel Krymets 2c108d9ba1
React to pipes in corefx (#2337) 2018-02-28 12:41:51 -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
David Fowler 2156030460
Clean up some of protocol abstractions (#2311)
* Clean up some of protocol abstractions
- Renamed PipeConnection to DuplexPipe
- Removed MemoryPool from ConnectionContext
- Work around value tuple issue on net471
2018-02-10 10:39:21 -08:00
Pavel Krymets 261b5836c1 Merge release/2.1 2018-01-30 09:39:33 -08:00
Pavel Krymets a84095e5c3
React to pipelines changes (#2275) 2018-01-29 14:34:48 -08:00
Stephen Halter 30a68dec49
Fix flakiness in address-in-use test (#2267)
* Increase test timeouts
* Use constant for default test timeout.
2018-01-24 17:42:49 -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 3fbfba63f8 HTTP/2: implement 100-continue (#2106) 2017-10-18 16:31:50 -07: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 9944c0fd43 Fix reading DATA frames with maximum length. 2017-09-20 11:15:31 -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
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