Stephen Halter
4e5920fd09
KestrelThread.Stop should wait for StartAsync to complete
...
- Previously KestrelThread.Stop might assume start failed prematurely
- This could cause a background thread to run indefinitely in the background
2016-03-02 15:04:29 -08:00
N. Taylor Mullen
c33b422d7a
Transition to netstandard.
...
- dotnet5.X => netstandard1.y (where y = x-1).
- DNXCore50 => netstandardapp1.5.
- Applied the same changes to ifdefs.
2016-03-01 13:36:06 -08:00
Ben Adams
dab1a1fa8d
bug dodge: Invalid Program Excep on Clr
2016-02-27 13:23:54 +00:00
Ben Adams
766803c573
Return 400 for bad requests and close conn
2016-02-27 12:35:12 +00:00
Ben Adams
4bfcd7ba1f
Drain chunked extensions + refactor
2016-02-26 23:48:51 +00:00
Ben Adams
e0f7bb06dd
Parse chunked trailing headers
2016-02-26 23:48:50 +00:00
Ben Adams
8d8176f14a
Consume chunked request fully
2016-02-26 23:48:49 +00:00
Cesar Blum Silveira
f21cb128e8
Handle 0-byte reads correctly ( #520 ).
2016-02-26 15:21:11 -08:00
Ben Adams
c2e5124d5a
Fix XML Comment
2016-02-22 22:43:30 -08:00
Ben Adams
58e07a8b2b
Put threads into background before starting
2016-02-20 06:15:11 +00:00
Ajay Bhargav Baaskaran
e14b86ebe0
Enabled xml doc generation
2016-02-18 16:27:55 -08:00
N. Taylor Mullen
795bbfce69
Update System.Linq 4.0.2-* => 4.1.0-*.
2016-02-18 15:36:17 -08:00
Chris R
aef612bdac
Add IHttpConnectionFeature.ConnectionId.
2016-02-18 11:10:55 -08:00
Cesar Blum Silveira
aa48ad2933
Merge branch 'benaadams/loopback-fastpath' into dev
2016-02-18 10:52:42 -08:00
Stephen Halter
bc56d11d8c
Set IsBackground property to true on libuv Threads for non-debug builds
...
- If libuv doesn't shutdown as expected, the process will still stop. Thanks @benaadams!
- Address other minor PR feedback.
2016-02-17 16:40:05 -08:00
Stephen Halter
53ecef0f98
Use libuv to track connections instead of ConcurrentDictionaries
...
- This means connections become untracked sooner than before and not all blocks will
necessarily be returned.
- The assertion in the MemoryPoolBlock2 finalizer was weakened because FilteredStreamAdapter
will continue to use blocks after libuv stops tracking the associated connection.
- Make 100% sure we don't accept new connections after we dispose the listen socket by using a flag.
- Add a (currently unused) AllowStop method to KestrelThread. This is meant to be called from
listeners when we stop accepting new connections, but needs investigation to prevent flakiness.
2016-02-17 16:05:35 -08:00
Stephen Halter
f4bb8d5eff
Verify that memory pool blocks aren't leaked in tests
2016-02-17 16:05:34 -08:00
Stephen Halter
304016fc3b
Close UvAsyncHandle properly to avoid zombie threads
...
- Even when safe handles are disposed explicitly, ReleaseHandle is sometimes
called on another thread which breaks uv_close.
- Ensure we close the UvAsyncHandle the uv loop so that the second call
to uv_run always completes without a timeout/Thread.Abort.
- Re-enable some tests. Add skip conditions for those that aren't passing.
2016-02-17 16:05:32 -08:00
Stephen Halter
54caf3071c
Close connections as quickly and gracefully as possible on shutdown
...
- Make the time given for requests to complete gracefully configurable.
- Complete all async reads so calling code can re-check whether to stop
request processing and exit if in between requests.
- Don't wait for a FIN from the client since some browsers (e.g. IE & Chrome)
will take a long time to send one.
- Ensure all ConnectionFilters complete before the memory pool is disposed.
- Ensure blocks get returned even when a ConnectionFilter produces a failed read
2016-02-17 16:05:23 -08:00
Stephen Halter
9c31907bac
Don't rely on the finalizer to return blocks referenced by SocketInput
2016-02-17 16:01:35 -08:00
Stephen Halter
87bd60746b
Merge branch 'benaadams/pool-headers' into dev
2016-02-17 16:00:20 -08:00
Ben Adams
020e0b9dc5
Enable TCP Loopback Fast Path (Windows)
...
Enable TCP Loopback Fast Path; where the IP layer is skipped, for lower
latency for localhost comms, like HttpPlatformHandler+IIS reverse proxy
http://blogs.technet.com/b/wincat/archive/2012/12/05/fast-tcp-loopback-performance-and-low-latency-with-windows-server-2012-tcp-loopback-fast-path.aspx
Have to do it this way due to open issue in libuv
Loopback fast path: libuv/libuv#489
Related: "Confirm HttpPlatformHandler uses Fast TCP Loopback"
aspnet/IISIntegration#29
2016-02-14 04:44:20 +00:00
Ben Adams
b473402cb1
Fast header clear
2016-02-13 11:49:00 +00:00
Ben Adams
f8aa1a676a
Pass ServerInformation as property of ServiceContext
2016-02-13 05:51:54 +00:00
Ben Adams
460dbb15c2
RO Headers & rationalise exceptions
2016-02-13 03:35:26 +00:00
Ben Adams
e533d5da89
Fast path Consume when already complete
2016-02-13 01:52:16 +00:00
Ben Adams
c293bbbd1a
Reuse headers to prevent values moving to higher GC gens
2016-02-13 01:16:17 +00:00
Stephen Halter
f89c959f4f
Merge branch 'benaadams/no-spin' into dev
2016-02-12 10:54:48 -08:00
moozzyk
fe75aa47db
Enabling Kestrel on OSx Mono when not running with dnx
...
Before moving to dotnet dnx on OSx on Mono would load libuv.dll into the process and Kestrel would use DllImport with __Internal to import functions from the native libraries loaded into the Mono process. With the move to dotnet nothing is preloading libuv to the process so Kestrel must no longer use DllImports with __Internal but the regular ones. Mono seems to load native libraries from the app folder so, the user won't have to install libuv on their own since libuv.dylib is published with the app.
2016-02-11 16:05:32 -08:00
Pranav K
c5a8792ece
Reacting to CoreCLR package version changes
2016-02-08 09:33:46 -08:00
Cesar Blum Silveira
6757a31fd2
Build with dotnet ( #571 ).
2016-02-01 14:37:47 -08:00
Cesar Blum Silveira
1209eca3fa
Normalize request path to NFC and resolve dot segments ( #273 ).
2016-01-28 15:29:29 -08:00
Brennan
15ed03eb26
React to Logging API changes
2016-01-27 14:25:52 -08:00
Stephen Halter
a2fe59fb2c
Speed up unit tests
...
- Remove unnecessary uses of Task.Delay
- Change all usages to CancellationToken.None to default(CancellationToken)
for consistency
2016-01-27 13:01:44 -08:00
Ben Adams
00b8a13b55
Merge+rename+rename resolve
2016-01-26 11:33:14 +00:00
Ben Adams
9f2d685cbf
Merge remote-tracking branch 'refs/remotes/aspnet/shalter/always-immediate' into combined-fixes
2016-01-26 02:15:56 +00:00
Stephen Halter
a4b8b01c99
Remove immediate parameter from Frame.ProduceStart
...
- Simply call SocketOutput.WriteAsync(_emptyData) to force headers to be flushed
2016-01-25 11:09:15 -08:00
Stephen Halter
7570da9daa
Flush chunked writes before the entire response completes
...
Ensure chunked writes force an "immediate" write by removing the now
unused immediate parameter from ISocketOutput.Write
2016-01-25 10:34:15 -08:00
Ben Adams
3f414782b9
Remove spinning for blocked socket ops
...
As per https://github.com/dotnet/corefx/pull/5655
2016-01-24 14:49:25 +00:00
Ben Adams
de34d14abb
WriteChunked immediate for large responses
2016-01-23 10:48:24 +00:00
Ben Adams
0ca8ca0328
Update FrameResponseStream Cancellation
2016-01-23 10:17:09 +00:00
Stephen Halter
735c0fbbef
Added new test to verify failed writes complete all pending write tasks
...
- Changed MockLibuv to never fall back to real libuv methods.
- Fixed EngineTests.ConnectionCanReadAndWrite
2016-01-23 10:17:07 +00:00
Ben Adams
e5238ff383
Only log connection error once
2016-01-23 10:17:06 +00:00
Ben Adams
cd621509d0
Complete all writes after error
2016-01-23 10:17:05 +00:00
Ben Adams
a97cb81f92
MockConnection Abort
2016-01-23 10:17:03 +00:00
Ben Adams
73bb0ab5b8
SocketOutput Cancellation handling
2016-01-23 10:17:02 +00:00
N. Taylor Mullen
b062f851dc
Rename AspNet 5 file contents.
...
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:23:51 -08:00
N. Taylor Mullen
3cfe2f3070
Rename AspNet 5 folders and files.
...
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:23:44 -08:00
Pranav K
40824999c6
Reacting to CoreCLR package version change
2016-01-20 20:58:22 -08:00
Stephen Halter
8ea24f05f4
Merge branch 'benaadams/reduce-sync-over-async' into dev
2016-01-19 16:35:51 -08:00
Ben Adams
fa8fe3d085
Complete sync-blocked calls directly
2016-01-19 22:38:08 +00:00
Brennan
63cd6149d1
Removed IsLocal from ConnectionInfo
2016-01-19 08:37:47 -08:00
Ben Adams
d3d9c8d546
Write async chunks async
2016-01-18 13:39:13 +00:00
Stephen Halter
129a5ad474
Bypass LibuvStream if no ConnectionFilter wraps it
2016-01-14 15:28:54 -08:00
Stephen Halter
e5ad019575
Revert "Merge branch 'benaadams/copyfrom-perf' into dev"
...
This reverts commit ce61282320 , reversing
changes made to 7ef70bc145 .
2016-01-14 11:47:23 -08:00
Stephen Halter
ce61282320
Merge branch 'benaadams/copyfrom-perf' into dev
2016-01-12 14:24:35 -08:00
Ben Adams
caaf9d473b
Faster CopyFrom
2016-01-12 21:43:37 +00:00
Stephen Halter
7ef70bc145
Merge branch 'anderman/FindFirstByteFast' into dev
2016-01-12 12:51:50 -08:00
Stephen Halter
d9f6ac70a0
Merge branch 'benaadams/using-reorder' into dev
2016-01-12 12:15:54 -08:00
Stephen Halter
f32f1c4440
Merge branch 'henkollema/projectjson' into dev
2016-01-12 12:14:35 -08:00
Stephen Halter
ab5ef547e1
Make chunked writes atomic
2016-01-11 16:53:46 -08:00
Stephen Halter
daa2b7e383
Remove _tasksCompleted from SocketOutput
...
- _tasksCompleted no longer helps avoid locking longer
2016-01-11 12:40:01 -08:00
Stephen Halter
df695accb0
Use TryEnter to acquire SocketOutput._contextLock on the libuv event loop
2016-01-11 12:39:59 -08:00
Stephen Halter
e90b61e6c5
Move call to CopyFrom in SocketOutput.WriteAsync inside lock to make writes atomic
2016-01-11 12:39:57 -08:00
Ben Adams
8ac119df76
using reorder (nit)
2016-01-11 19:02:51 +00:00
Thom Kiesewetter
1b09a76ebb
Find First Byte Fast
2016-01-11 08:31:52 +01:00
clrjunkie
63e39a257e
One-time-use allocated blocks keep reference to source pool / Assert that a block is returned to it's source pool / Managed block are only returned to active Slabs
2016-01-09 19:41:35 +02:00
clrjunkie
8260e5d93f
Remove null-conditional operators and asserts (Blocks must return to pools)
2016-01-09 19:36:26 +02:00
Stephen Halter
849ff2016c
Use object.ReferenceEquals when comparing Actions in SocketInput
2016-01-08 15:40:07 -08:00
Stephen Halter
b63dd40efb
Protect SocketInput against concurrent consumption
2016-01-08 11:14:15 -08:00
Stephen Halter
f3a39d98da
Merge branch 'benaadams/socket-input' into dev
2016-01-08 11:12:43 -08:00
Henk Mollema
b4b5f07a08
Detect mono using PlatformAbstractions
2016-01-07 00:48:36 +01:00
Henk Mollema
db11368d26
Remove StandardsPoliceCompileModule usage
...
Just a test - this seems to fix the build
2016-01-07 00:35:51 +01:00
Henk Mollema
e81c5adce2
Change #ifdefs
2016-01-07 00:35:50 +01:00
Henk Mollema
97a5149dd9
Remove dnx451 and dnxcore50 TFM's
2016-01-07 00:35:49 +01:00
Stephen Halter
ffd950966e
Merge branch 'benaadams/string-construct' into dev
2016-01-06 12:14:15 -08:00
Stephen Halter
c4605bea20
Merge branch 'benaadams/pendingwrites' into dev
2016-01-05 12:57:23 -08:00
Stephen Halter
b1a4e8cd1e
Merge branch 'anderman/faster-unsafe' into dev
2016-01-05 12:33:14 -08:00
Stephen Halter
48233cd081
Merge branch 'benaadams/memorypool-seek' into dev
2016-01-05 12:09:04 -08:00
Ben Adams
bc19a07291
ifdef comments on own line
2016-01-05 12:08:39 -08:00
sergey-tom
406d785b5e
Fix typo
...
Looks like value from wrong variable is passed to Marshal.FreeHGlobal method. So IntPtr.Zero is passed to the method and actual pointer is lost.
2016-01-05 15:14:49 +01:00
Ben Adams
e6bc0bc335
Only scheduleWrites on the threadpool
2016-01-05 11:42:41 +00:00
Ben Adams
480996433e
Only queue write when not queued
2016-01-05 11:33:29 +00:00
Ben Adams
4c39800ea4
Seek perf extra
...
See https://github.com/aspnet/KestrelHttpServer/issues/541
2016-01-05 09:37:50 +00:00
Ben Adams
1eda5178de
Seek perf + faster non vector path
2016-01-05 09:37:49 +00:00
Cesar Blum Silveira
7cc51959d9
Merge branch 'Anderman/TakeStartLine' into dev
2016-01-04 13:54:51 -08:00
Cesar Blum Silveira
a53949c33e
Add CORS headers to known headers ( #389 ).
2016-01-04 12:26:21 -08:00
Stephen Halter
11e046e017
Merge branch 'benaadams/name-thread' into dev
2016-01-04 11:55:53 -08:00
Ben Adams
cf77efc2ff
Fast path pre-completed Input reads
2016-01-02 03:57:02 +00:00
Ben Adams
afe944c053
Simplify SocketInput, remove locks, only use pooled blocks
2016-01-02 03:50:55 +00:00
David Fowler
4f8ec86b54
React to HttpAbstractions changes
2015-12-31 14:04:47 -08:00
Stephen Halter
5296d89337
Merge branch 'benaadams/messagebody.for' into dev
2015-12-30 17:38:48 -08:00
Stephen Halter
072f2b1a20
Merge branch 'benaadams/valuetask' into dev
2015-12-30 16:51:48 -08:00
Thom Kiesewetter
36e9e8759a
Optimize TakeFirst Line with Known method and Version
2015-12-31 01:24:59 +01:00
Ben Adams
ea3e64ab87
Loop unrolled direct string inject
2015-12-30 23:09:59 +00:00
Cesar Blum Silveira
6fbb9a0cfe
Cleanup: private embedded types and readonly where appropriate ( #187 ).
2015-12-30 12:47:13 -08:00
Ben Adams
f7ac457b40
Use ValueTask
2015-12-30 19:41:55 +00:00
Ben Adams
5c58d48272
Name KestrelThreads
...
Helps with debugging, profiling
2015-12-30 13:06:27 +00:00
Cesar Blum Silveira
acc80bcbc5
Merge branch 'benaadams/take' into dev
2015-12-29 11:46:24 -08:00
Thom Kiesewetter
8fdfef460a
Faster unsafe pointers
2015-12-29 15:03:52 +01:00