Commit Graph

580 Commits

Author SHA1 Message Date
Mike Harder a594d0eeb8 Workaround for "Explicit RID still required for .NET Framework test projects"
- Addresses #1617
2017-04-06 15:49:23 -07:00
Pavel Krymets dd02ba577f Use corefxlab and corefx by source (#1612) 2017-04-05 15:37:45 -07:00
Cesar Blum Silveira 7d50f34b85 Show unexpected error logs in assertion failures. 2017-04-05 11:23:04 -07:00
David Fowler bab4332a47 Add benchmark that drains the buffer without going through the pipe (#1611) 2017-04-05 10:09:43 -07:00
Cesar Blum Silveira adea477824 Re-write commented out tests in RequestHeaderLimitsTests as Frame tests (#1583). 2017-04-05 10:09:31 -07:00
Stephen Halter b40d8b4248 Fix naming of IConnectionInformation.OutputReaderScheduler (#1608) 2017-04-04 21:30:33 -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
Cesar Blum Silveira 6a66323a99 Remove Kestrel.Core dependency from Transport.Libuv (#1584). 2017-04-03 20:54:01 -07:00
Pavel Krymets fd5f3a771c React to corefxlab changes (#1602) 2017-04-03 20:20:39 -07:00
Stephen Halter f5d7caa9fa Remove swp file (#1601) 2017-04-03 16:27:37 -07:00
Cesar Blum Silveira 6bd0344880 Add Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions project (#1582).
- Changes the design to have one ConnectionHandler per endpoint.
2017-04-03 15:09:03 -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
David Fowler 547ad80a27 Don't update consumed if we didn't see a new line (#1592)
* Don't update consumed if we didn't see a new line
- The start line parser incorrectly updated the consumed cursor
when it attempted to find new lines across buffers. This change fixes
that and also removes passing the span by reference (which will be illegal).
- Added a unit test
2017-04-02 00:03:06 -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
Cesar Blum Silveira 6b9d54265f Call ProduceEnd() before consuming request body if response has already started (#1530). 2017-03-31 11:08:55 -07:00
Ryan Nowak 0ab49f4977 Fix benchmarks on netcoreapp2.0 2017-03-31 10:39:55 -07:00
David Fowler b4cec03f65 Update libuv package (#1577)
- The latest libuv package has a new linux RID that should
let us remove the work around with setting the RID
in the docker file and systemd service
2017-03-31 10:19:27 -07:00
David Fowler 1bf9b057d4 Converted test projects to run on netcoreapp2.0
* Converted test projects to run on netcoreapp2.0
* Set DOTNET_RUNTME_ID because of an issue in corehost and RID calculation.
2017-03-31 02:58:18 -07:00
David Fowler c3ad007b0d Fixed regression caused by transport refactoring (#1573)
* Fixed regression caused by transport refactoring
- Libuv should not close the socket until it has started it. Before this was enforced
by calling ReadStart before starting the frame but the flow has changed. Now that closing the connection
is communicated via the pipe, we need to start consuming writes after calling ReadStart.
- Renamed OnSocketClosed to Close and moved dispose and logging into that method.

Fixes #1571
2017-03-30 09:33:28 -07:00
Cesar Blum Silveira 1be31ae2ce Throw if UseUrls specifies HTTPS or path base (#1519). 2017-03-29 20:23:51 -07:00
Cesar Blum Silveira e64bffd25c Remove deprecated property KestrelServerOptions.MaxRequestBufferSize (#1027). 2017-03-29 20:15:08 -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
Pranav K 200d8debc0 Use the SDK version of GetOSPlatform 2017-03-28 14:27:54 -07:00
Cesar Blum Silveira db7348e776 Fix flakiness in WhenAppWritesLessThanContentLengthButRequestIsAbortedErrorNotLogged. 2017-03-27 10:10:28 -07:00
Cesar Blum Silveira 47f1db20e0 Fix races on port acquisition in AddressRegistrationTests (#1520). 2017-03-24 16:46:40 -07:00
David Fowler 0f28c49c5e Fix the invalid usages of Span<T> (#1549) 2017-03-24 11:06:16 -07:00
Pranav K d6d13a0986 Remove net451 as a cross-compile target 2017-03-24 07:44:11 -07:00
Cesar Blum Silveira 3e6303b6c1 Fix flakiness in connection reset logging tests. 2017-03-23 21:52:29 -07:00
Ben Adams ff99c4c865 Fix benchmarks (broken) (#1515)
* Fix benchmarks
* Remove Moq from benchmarks
2017-03-22 18:30:06 -07:00
Stephen Halter fffb823e99 Dispose socket in test after synchronous connect 2017-03-22 10:33:38 -07:00
Cesar Blum Silveira 751a0e2e7e Better checks for connection reset in RequestTests.ConnectionReset* tests (#1517) 2017-03-21 19:35:41 -07:00
Cesar Blum Silveira 72587baac3 Check that MaxRequestBufferSize is greater than or equal to MaxRequestHeadersTotalSize (#1491). 2017-03-21 19:25:56 -07:00
Stephen Halter 6c131ea240 Verify scopeids are connectable using Socket before testing Kestrel (#1536) 2017-03-21 18:31:29 -07:00
Ben Adams 32d6b42964 Respond to corefxlab rename (build break) (#1529) 2017-03-21 08:43:49 -07:00
David Fowler cf576559b6 Fix write after close (#1526)
- Change Alloc to be a Write with a callback that exposes the WritableBuffer.
This allows the ISocketOutput to implementation to not call the callback if
the underlying socket is dead.
- Added a new functional test
2017-03-20 23:58:26 -07:00
Cesar Blum Silveira 3b40ba52ca Check if request is aborted before verifying response bytes written (#1498). 2017-03-20 16:02:25 -07:00
Stephen Halter 8923b0da70 Use correct config for response buffer limit (#1516) 2017-03-20 15:43:55 -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
David Fowler 1094cc0670 Use StreamSocketOutput for writing benchmarks (#1507)
- Use StreamSocketOutput with a null stream to get a
better picture of what actual performance looks like
2017-03-18 13:20:07 -07:00
Ben Adams 5b814a55ac Speed up WritableBuffer.WriteXxx (#1504)
* Speed up WritableBuffer.WriteAscii
* Add Benchmarks
* Non-standard header vals are still ascii
* Speedup WriteNumeric
* Don't advance for write
* Remove cruft
2017-03-18 12:25:10 -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
Cesar Blum Silveira 2ef3804578 Span-based RemoveDotSegments (#1448) 2017-03-17 14:42:13 -07:00
Nate McMaster 9a4a810aa8 Fix race conditions in test event listener 2017-03-15 10:26:09 -07:00
Cesar Blum Silveira 632780dd16 Remove splitting of path and path base (#1050). 2017-03-15 09:57:33 -07:00
Nate McMaster d4c0d4b81e Adds an EventSource named 'Microsoft-AspNetCore-Server-Kestrel' with the following event and properties:
ConnectionStart:
 - connectionId
 - scheme
 - localEndPoint
 - remoteEndPoint

ConnectionStop:
 - connectionId
2017-03-14 16:59:11 -07:00
Nate McMaster 5073d4fdaf Re-add .NET Framework to tests and other cleanup (#1494) 2017-03-14 11:02:49 -07:00
Ben Adams b94912bcb1 InitializeHeaders only at start of parsing/Fix remaining (#1488)
* Don't reinitialize header collection each loop
* Correct remaining tracking value
* Add tests
2017-03-13 15:32:28 -07:00
David Fowler 5644310811 Clean up benchmarks (#1487)
- Benchmarks are suffixed with *Benchmarks
- Removed Custom RpsColumn.cs and used Ops/Second column
- Removed params from RequestParsingBenchmark
2017-03-12 22:52:24 -07:00