Commit Graph

52 Commits

Author SHA1 Message Date
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
John Luo 6ad9f3e8b0 Reacting to HeaderUtitilities renames 2017-02-28 14:50:02 -08:00
Cesar Blum Silveira f5ac8c4ebd Don't require framework when running CodeGenerator. 2017-02-28 13:50:16 -08:00
Cesar Blum Silveira a95743c5f6 Add functional test to verify generated code is up to date (#1369). 2017-02-27 14:19:56 -08:00
David Fowler 5692f51bf7 Revert "Revert "Use Spans to parse the start line and headers (#1394)""
This reverts commit 19c3107deb.
2017-02-24 10:22:05 -08:00
David Fowler 19c3107deb Revert "Use Spans to parse the start line and headers (#1394)"
This reverts commit 8140b8cdfe.
2017-02-24 10:03:32 -08:00