Commit Graph

57 Commits

Author SHA1 Message Date
John Luo cc45d0cb41 Use dev certs
- Also update tfms
2018-10-15 11:29:55 -07:00
Chris Ross (ASP.NET) daf6e1ecd7 Http/2 response trailers #622 2018-10-05 12:50:46 -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
Simon Cropp d3d7c55198 fix some spelling (#2888) 2018-09-06 11:48:25 -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
Nate McMaster 1f3524787e
Merge branch 'release/2.1' into release/2.2 2018-07-24 11:43:13 -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 c683316253
Generate repetitive TransportConnection FeatureCollection code (#2548) 2018-05-14 17:20:48 -07:00
Stephen Halter b0e1fa5e30 Fix connection abort 2018-04-23 17:01:49 -07:00
Ben Adams e30a02cee5 Less StringValue struct copies for header checks (#2488) 2018-04-13 18:21:50 -07:00
Chris Ross (ASP.NET) bfdb48717f Host header format validation 2018-03-13 16:37:03 -07:00
Ben Adams 300453396a Pass StringValues via in (#2295) 2018-02-28 19:54:44 -08:00
Pavel Krymets 2c108d9ba1
React to pipes in corefx (#2337) 2018-02-28 12:41:51 -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 c0f88ebdc1 Faster IFeatureCollection.Get<TFeature> (#2290) 2018-02-22 16:44:38 -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
Nate McMaster 6c82f78c65 Pin tool and package versions to make builds more repeatable
Part of aspnet/Universe#575
2017-11-01 15:18:49 -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
Nate McMaster 26f1d4baa3 Use PackageLineup
PackageLineup is a way to manage PackageReference versions across large projects. It removes the version information from the repository and instead pulls the information from an external "lineup" file.
2017-08-16 14:10:43 -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
Pavel Krymets 659fa967a1 Consume corefxlab packages and private build of C# compiler (#1976) 2017-08-07 13:58:19 -07:00
Nate McMaster 6584a8b5fd Shorten folder names
Remove the Microsoft.AspNetCore.Server prefix from csproj and their folders. This is required to help us avoid max path issues on Windows.
2017-07-28 11:11:55 -07:00
Cesar Blum Silveira eca4bfe6c3 Add response minimum data rate feature. 2017-07-07 22:37:25 -07:00
Stephen Halter e9ffcdb414 Add feature to optionally disallow synchronous IO (#1919)
* Allow synchronous IO by default
2017-07-03 11:07:17 -07:00
Cesar Blum Silveira f2061ed716 Rename request body min rate APIs (#1901). 2017-06-29 17:16:34 -07:00
Cesar Blum Silveira fcc04f8c3d Add request body minimum data rate feature (#1874). 2017-06-08 14:36:03 -07:00
Stephen Halter f96c48c08d Add a request body size limit (#1877)
- Implement IHttpMaxRequestBodySizeFeature
2017-06-07 11:48:56 -07:00
Pavel Krymets 28b479c99a Merge branch 'rel/2.0.0-preview1' into dev 2017-05-05 14:35:41 -07:00
Pavel Krymets a9c165e666 netcoreapp2.0 (#1810) 2017-05-05 14:31:34 -07:00
Stephen Halter 557cf29e4a arespr/knownmethods-optimizations cleanup 2017-05-04 12:27:22 -07:00
Stephen Halter f464760bf8 Merge branch 'arespr/knownmethods-optimizations' into dev 2017-05-04 11:44:54 -07:00
Ben Adams 2863cca8ca FrameFeatureCollection benchmark (#1643) 2017-04-09 16:02:18 -07:00
Pavel Krymets 53b0eea2ec Use writable buffer writer (#1564) 2017-04-07 14:40:10 -07:00
Pavel Krymets dd02ba577f Use corefxlab and corefx by source (#1612) 2017-04-05 15:37:45 -07:00
Cesar Blum Silveira 7ceea5323a Rename namespaces/directories/classes in Kestrel.Core and Transport.Libuv (#1582).
- Put everything in the libuv transport package under `Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.*` namespaces.
- Move stuff in Transport.Libuv/Internal/Http and Transport.Libuv/Internal/Infrastructure to Transport.Libuv/Internal (keep the Networking directory for the libuv wrappers).
- Add `Libuv` prefix to most libuv internal classes.
- Rename `KestrelEngine` to `LibuvTransport`.
- Rename `SocketOutputConsumer` to `LibuvOutputConsumer`.
- Rename `SocketOutputProducer` to `OutputProducer`.
- Fix namespaces in `Microsoft.AspNetCore.Server.Kestrel.Core.`
2017-04-04 13:45:02 -07:00
Pavel Krymets c7113e1c60 Revert "Fetch corefx lab sources and compile them into kestrel (#1581)"
This reverts commit 13ee32b7ab.
2017-04-03 14:08:27 -07:00
Pavel Krymets 13ee32b7ab Fetch corefx lab sources and compile them into kestrel (#1581) 2017-04-03 13:21:17 -07:00
Nate McMaster 83958886cc
Implement IHttpRequestIdentifierFeature on Frame
This feature generates a unique ID per request. This unique ID can be
used in event source and logging.

Also, this change improves KestrelEventSource by moving it back into the
Kestrel.Core assembly and de-coupling from the Libuv transport. This
adds two new events, RequestStart and RequestStop, which can be used to
identify the correlation between connection ID and request trace
identifier.
2017-03-31 16:54:35 -07:00
Nate McMaster 6b6a8347cc
Add Connection as a primary request header 2017-03-29 16:40:50 -07:00
Nate McMaster 686829d226
Add tests for WritableBuffer extensions and rename WriteAscii => WriteAsciiNoValidation 2017-03-29 16:10:31 -07:00
Stephen Halter 7f785588ef Transport agnostic kestrel refactoring (#1551)
- Add transport interfaces
- Create separate Core and Libuv projects

#828
2017-03-29 16:06:05 -07:00
David Fowler c65734667a Optimize calls into StreamSocketOuput to WriteFast further (#1538)
* Optimize calls into StreamSocketOuput to WriteFast further
- Added overloads to array, offset, length to avoid implicit conversions to
ReadOnlySpan.
- Use similar optimizations for multi buffer writes for strings and ints
- Use ref locals in multi write instead of pointers and pinning
2017-03-22 02:16:28 -07:00
David Fowler 2ed456fd68 Faster Write implementation using cpblk (#1511)
* Faster Write implementation
- Use Unsafe.CopyBlockUnaligned to copy bytes to the
WritableBuffer. This is temporary until we get newer
corefx bits with a better span.CopyTo implementation.
- Remove WritableBufferExtensions from Performance project
- Split method into WriteFast and WriteMultiBuffer
- Cache the span for the common case where
the buffer is non empty.
- Use ref locals instead of pinning pointers in fast path
2017-03-19 12:44:01 -07:00
Pavel Krymets 07cbf7faa9 Use pipelines for SocketOutput
- Changed socket output to be based on pipelines
- Changed connection filter glue to be based on pipelines
- Codegen that used `MemoryPoolIterator` for output now uses `WritableBuffer`
- Made `UvWriteReq` async/await friendly with `LibuvAwaitable<T>`
- Deleted MemoryPool and friends
2017-03-18 00:26:00 -07:00
Nate McMaster 5073d4fdaf Re-add .NET Framework to tests and other cleanup (#1494) 2017-03-14 11:02:49 -07:00
arespr d755f6183a Merge branch 'dev' into knownmethods-optimizations 2017-03-11 22:50:58 +01:00
arespr e9250323e0 update GeneratedCodeTests 2017-03-08 22:20:43 +01:00
arespr 0bca84a268 Add HttpUtilities to CodeGenerator 2017-03-08 19:17:12 +01:00