Nate McMaster
4dc7946cd8
Implement new request trace identifier format
...
The format:
The trace identifier begins with connection ID and ends with a number that increments with each request per connection.
Example:
Connection ID = xyz
Request 1 = "xyz:00000001"
Request 2 = "xyz:00000002"
...
Request 15 = "xyz:0000000F"
Request 16 = "xyz:00000010"
2017-05-01 09:50:47 -07:00
Florian Greinacher
3375cf0e28
Update README.md ( #1799 )
...
Kestrel is not (only) libuv-based anymore :)
2017-04-30 11:00:31 -07:00
David Fowler
9a5d6c8879
More shutdown tweaks ( #1760 )
...
* More shutdown tweaks
- Added assert if loop has ended before starting the shutdown
sequence.
2017-04-29 01:15:10 -07:00
Stephen Halter
7122b6c4aa
Fix flaky heartbeat test ( #1794 )
2017-04-29 00:42:27 -07:00
David Fowler
749e282102
Prepare for OnReader/WriterCallbacks changes ( #1791 )
...
- This change does a few things:
1. It adds the events we will replace with
pipe events to IConnectionContext and IConnectionInformation to get out of
band notifications about pipe completions.
2. It also implements those callbacks
and exposing slight changes we'll need to make once we have them. The idea is
that we can delete/replace these methods once we have the new pipe API and things
will keep working.
2017-04-29 00:41:48 -07:00
Cesar Blum Silveira
3b2d0a52f3
Merge branch 'rel/2.0.0-preview1' into dev
2017-04-28 10:00:17 -07:00
Cesar Blum Silveira
9185deecda
Avoid port conflicts in AddressRegistrationTests ( #1721 ).
2017-04-28 09:56:29 -07:00
David Fowler
cfad8051d5
Merge branch 'rel/2.0.0-preview1' into dev
2017-04-27 21:00:46 -07:00
David Fowler
0e372edb2c
Removed UseTransportThread ( #1781 )
2017-04-27 20:59:50 -07:00
Cesar Blum Silveira
c3d3a91571
Merge branch 'rel/2.0.0-preview1' into dev
2017-04-27 18:08:40 -07:00
Cesar Blum Silveira
005b884b7d
Build rel/ branches on Travis and AppVeyor.
2017-04-27 18:07:57 -07:00
David Fowler
5b62024fc8
* Properly handle FINs and resets in the SocketConnection ( #1782 )
...
- FIN from the client shouldn't throw
- Forced close from the server should throw
- Properly wrap connection reset exceptions and other exceptions
in IO exceptions
- This gives kestrel control over when the output closes
- Fixed one test that assumed libuv
- Dispose the connection to yield the reader
Fixes #1774
2017-04-27 17:55:35 -07:00
Stephen Halter
4799c0e423
Merge branch 'rel/2.0.0-preview1' into dev
2017-04-27 16:59:00 -07:00
Stephen Halter
79ea2bb9b3
Quick fix for SslStream ODEs in HttpsAdaptedConnection.PrepareRequest ( #1786 )
2017-04-27 16:56:07 -07:00
David Fowler
0755495ce5
Remove Logging dependency from the http parser ( #1780 )
...
* Remove Logging dependency from the http parser
2017-04-27 08:46:08 -07:00
Nate McMaster
c2f15fcac3
Move user-facing strings into resource files
2017-04-26 17:22:55 -07:00
BrennanConroy
ead08706ae
Merge remote-tracking branch 'origin/rel/2.0.0-preview1' into dev
2017-04-26 13:45:20 -07:00
BrennanConroy
1a26dc0238
React to Logging API changes ( #1775 )
...
React to Logging API changes
2017-04-26 13:44:55 -07:00
Nate McMaster
3dedea2389
Merge branch 'rel/2.0.0-preview1' into dev
2017-04-26 11:28:46 -07:00
Nate McMaster
9464003bda
Add wait in ListenerPrimaryTests to avoid race condition with List.Add
2017-04-26 11:03:28 -07:00
Pranav K
099f8f1a47
Updating package version to preview2
2017-04-26 07:13:10 -07:00
Pranav K
e76737b8a6
Merge branch 'rel/2.0.0-preview1' into dev
2017-04-25 22:03:32 -07:00
Pranav K
d9dad9400c
Branching for 2.0.0-preview1
2017-04-25 22:03:29 -07:00
Nate McMaster
eb1301f28d
Skip HostName binding test when network is unreachable
2017-04-25 14:33:06 -07:00
Pranav K
5b976a9fa3
Use Bundled NETStandard.Library \ NETCoreApp versions instead of explicitly specifying one
2017-04-25 12:51:48 -07:00
David Fowler
566a587126
Added ApplicationSchedulingMode to KestrelServerOptions ( #1759 )
...
* Added ApplicationSchedulingMode to KestrelServerOptions
- Made default mode Default instead of ThreadPool
2017-04-25 00:37:09 -07:00
Stephen Halter
a4def946a6
Fix flaky 400 response tests ( #1758 )
2017-04-24 23:48:47 -07:00
Pavel Krymets
e3e78bc461
Fix LibuvOutputConsumerTests ( #1757 )
...
* Fix LibuvOutputConsumerTests
2017-04-24 17:37:30 -07:00
David Fowler
9e80fb65bd
Removed the wrote after disconnect log ( #1747 )
...
- It's not very useful
2017-04-24 17:34:56 -07:00
Stephen Halter
f26c31c116
Fix scope id test failures on mac and linux ( #1754 )
2017-04-24 17:15:41 -07:00
Nate McMaster
39047638cc
Add debug logging in address binding when IPv6Any fails
2017-04-24 17:14:43 -07:00
Nate McMaster
089ff49643
Put hostname address registration into separate test
2017-04-24 17:14:43 -07:00
Stephen Halter
c22f8f5c59
Fix potential race in LibuvThread.StopAsync ( #1756 )
2017-04-24 16:47:48 -07:00
David Fowler
a98581670e
Schedule connection adapter reads on configured thread pool ( #1741 )
...
* Schedule connection adapter reads on configured thread pool
- This should speed up connection adapters as we don't block
new reads. It *might* also help some of the test flakiness
2017-04-24 12:19:22 -07:00
David Fowler
7e5604b2f5
Remove async from OnRead ( #1746 )
...
- Remove async from fast path.
- Added ApplyBackpressureAsync that pauses and resumes reading
2017-04-24 11:58:52 -07:00
Pavel Krymets
df9e48b1f0
Add cancellation support for write async ( #1736 )
2017-04-24 11:58:08 -07:00
David Fowler
71d2abed06
More clean up of LibuvConnection ( #1743 )
...
* More clean up of LibuvConnection
- Use C# 7
- Use Buffer<T>.Pin to get access to the underlying
pointer instead of using TryGetPointer.
2017-04-23 20:45:03 -07:00
David Fowler
db44f5b672
Clean up LibuvOutputConsumer ( #1744 )
...
* Clean up LibuvOutputConsumer
- Added UvShutdownReq.ShutdownAsync
- Added Debug.Assert in LibuvAwaitable since it should never race.
2017-04-23 20:22:49 -07:00
David Fowler
650a3ccc26
Pass exception to Complete ( #1739 )
2017-04-21 23:31:59 -07:00
David Fowler
a749939be4
Clean up libuv connection ( #1726 )
...
* Clean up libuv connection
- Cancel all pending flushes on the input writer before
disposing the stream handle.
- Complete the pipe before disposing the socket
- Added logging for connection pause/resume.
- Added test
2017-04-21 13:13:05 -07:00
David Fowler
feb9d1281e
Tweak libuv shutdown sequence ( #1735 )
...
* Tweak libuv shutdown sequence
- Increase timeouts for thread and listener shutdowns
- Remove post.Unreference call from AllowStopRude
2017-04-21 13:12:37 -07:00
David Fowler
dcea15dba7
Skipped newly failing AddressRegistration tests failing tests on OSX and Linux ( #1732 )
...
* Unblock CI
2017-04-21 01:54:44 -07:00
Stephen Halter
a14eabce9a
RequestTests and ResponseTests cleanup ( #1723 )
2017-04-20 16:33:05 -07:00
Nate McMaster
ee9feedc27
Improve implementation of IHttpUpgradeFeature
...
After upgrade has been accepted by the server:
- Reads to HttpRequest.Body always return 0
- Writes to HttpResponse.Body always throw
- The only valid way to communicate is to use the stream returned by IHttpUpgradeFeature.UpgradeAsync()
Also, Kestrel returns HTTP 400 if requests attempt to send a request body along with Connection: Upgrade
2017-04-20 12:42:58 -07:00
Stephen Halter
bebba2a113
Make UnrootedConnectionsGetRemovedFromHeartbeat test less flaky ( #1727 )
2017-04-20 10:58:48 -07:00
David Fowler
d0743806d8
Disable UnrootedConnectionsGetRemovedFromHeartbeat because it's flaky
2017-04-20 10:21:20 -07:00
David Fowler
d1494224f4
Make the tests that use the Heartbeat more deterministic. ( #1724 )
...
- Added Start to Heartbeat and made OnHeartbeat internal
- Explicitly call start in tests
2017-04-20 01:41:37 -07:00
Stephen Halter
a053ca4758
Move shutdown logic from transport to core ( #1707 )
...
* Move shutdown logic from transport to core
* Use weak references to track FrameConnections
2017-04-19 18:08:36 -07:00
David Fowler
d40dbb81ea
Fixed broken tests that leak UvWriteReq
2017-04-19 17:50:43 -07:00
Nate McMaster
7a3a731686
Refactor address binding and handle EAFNOSUPPORT
...
- Simplify KestrelServer by refactoring address binding into a separate class
- Use strategy pattern to implement address binding for different sceanrios
- Add fallback from binding 0.0.0.0 if binding to [::] fails (can happen if UvException with EAFNOSUPPORT is thrown)
2017-04-19 15:58:12 -07:00