Stephen Halter
0dbf108353
Smarter unpinning of MemoryPoolBlock2 in SocketOutput
2015-11-20 12:59:53 -08:00
Stephen Halter
2572256d3f
Use MemoryPool2 for SocketOutput Buffers
...
Add ProducingStart and ProducingComplete methods to ISocketOutput.
These new methods can help prevent double buffering when encoding.
2015-11-20 04:41:33 -08:00
Ben Adams
9d852632c0
Remove _nullBuffer
...
Was meant to be removed as part of #335
/cc @rynowak
2015-11-20 05:51:25 +00:00
Ben Adams
174ec739bb
Don't log ODEs thrown from _abortedCts.Cancel
2015-11-20 00:30:08 +00:00
Ben Adams
3c7431aa35
Change disconnect to abort cts
2015-11-19 23:25:31 +00:00
Ben Adams
58d8c851c5
Remove CreateLinkedTokenSource
...
Resolves #407
2015-11-19 21:50:10 +00:00
Cesar Blum Silveira
307e020703
Don't crash the server if a connection filter throws synchronously.
2015-11-19 13:27:43 -08:00
Master T
efec0feda2
Fix merge
2015-11-18 08:29:30 +01:00
Master T
2cdd659e67
Fix indentation
2015-11-18 05:11:57 +01:00
Master T
8e910baf04
Improve based on pull request feedback
2015-11-18 05:06:27 +01:00
Master T
bd30f28dfd
Implement client certificate authentication
2015-11-18 05:05:50 +01:00
David Fowler
9c47796ec0
Merge pull request #312 from benaadams/MemoryPoolIterator2-GetString
...
Reduce GetString allocs and conversions
2015-11-16 20:13:38 -08:00
Ben Adams
4dc4346fca
Reduce GetString allocs and conversions
2015-11-17 03:46:09 +00:00
Stephen Halter
f7a5c38f65
Follow common pattern for implementing IHttpRequestLifetimeFeature
2015-11-16 16:03:55 -08:00
Stephen Halter
b73e42b617
Abort request on any write failure
2015-11-16 16:03:53 -08:00
Stephen Halter
874bd29ce1
Throw IOExceptions instead of ODEs after a request is aborted
2015-11-16 16:03:51 -08:00
Stephen Halter
062caf16be
Support for IHttpRequestLifetimeFeature
2015-11-16 16:03:50 -08:00
Ben Adams
1cbb273b0d
Corrected Exception messages
2015-11-16 16:03:48 -08:00
Ben Adams
5e883827e0
Explain why dispose can't be used
2015-11-16 16:03:46 -08:00
Ben Adams
f60f6c92ca
Stop streams on finish
...
Can't use dispose (or close) as can be disposed too early by user code
Resolves #263
2015-11-16 16:03:44 -08:00
David Fowler
7ba0f7da19
Merge pull request #377 from benaadams/legacy
...
Result -> GetAwaiter().GetResult() for legacy
2015-11-16 12:13:45 -08:00
David Fowler
e3a62ff09f
Merge pull request #335 from benaadams/used-pool-array
...
Consume body without allocating or reading
2015-11-16 11:47:18 -08:00
Ben Adams
7691a7cc23
Improved Send100 Check
2015-11-16 06:43:49 +00:00
Ben Adams
ecc439555e
Reuse ReadAsync for Consume
2015-11-15 22:27:39 +00:00
Ben Adams
1589b54018
Early bail, completed tasks+Interlocked
2015-11-15 21:56:20 +00:00
Ben Adams
f089abd337
Consume in single call
2015-11-15 21:39:36 +00:00
Ben Adams
f48e6ba51a
Add Async in method name
2015-11-15 21:28:36 +00:00
Ben Adams
f7bdc5a4e9
Skip non-consumed rather than reading
2015-11-15 21:28:33 +00:00
Cesar Blum Silveira
a3a49d21b8
Reset Frame.Scheme on each request ( #366 ).
2015-11-13 16:05:10 -08:00
Ben Adams
96c1668c54
Result -> GetAwaiter().GetResult() for legacy
2015-11-13 20:08:59 +00:00
Ben Adams
d82c571831
Trim exposed KestrelThread api
2015-11-13 20:08:11 +00:00
Stephen Halter
fc346f7768
Avoid some closure allocations in SocketOutput
2015-11-12 17:08:44 -08:00
Stephen Halter
59cdd60af6
Don't pre-complete too many writes
2015-11-12 17:08:43 -08:00
Stephen Halter
6b995362f1
Merge branch 'benaadams/odd-sync' into dev
2015-11-12 16:47:27 -08:00
Stephen Halter
983997ab9c
Merge branch 'nickcraver/cancellation' into dev
2015-11-12 16:15:59 -08:00
Stephen Halter
9958427db7
Merge branch 'benaadams/result-getawaiter' into dev
2015-11-12 16:05:50 -08:00
Stephen Halter
fdfd7dcf36
Merge branch 'benaadams/Task.Run-QueueUserWorkItem' into dev
2015-11-12 15:51:42 -08:00
Nick Craver
a45a671b22
Make ReadAsync state overload 451 only and private.
2015-11-11 18:55:56 -05:00
Ben Adams
0500043cc9
.Result -> .GetAwaiter().GetResult()
2015-11-11 09:46:56 +00:00
Nick Craver
d1221e82c1
Pass cancellation tokens down consistently
...
I'm assuming these are oversights since the usage is inconsistent.
Otherwise this served only as a mild waste of time :)
2015-11-10 22:58:19 -05:00
Ben Adams
d32937eafe
Add tests for non-immediate byte counting
2015-11-10 23:17:40 +00:00
Ben Adams
34cec3448d
SocketOutput to Tasks
2015-11-10 19:53:43 +00:00
Ben Adams
344c821f83
Remove sync block->task
...
await rather than synchronously blocking and then returning a
Task.FromResult
2015-11-10 18:23:44 +00:00
Ben Adams
a2c4e3a654
Task.Run -> ThreadPool.QueueUserWorkItem
...
Task.Run eventually ends up being QueueUserWorkItem.
The returned task is ignored, so no added goodness.
Short running item.
Cut out the middleman
2015-11-10 07:28:17 +00:00
Stephen Halter
bb9f83186b
Remove unused parameter from ListenerSecondary.ReadStartCallback
2015-11-05 12:09:50 -08:00
Stephen Halter
fff28990fe
Ensure ListenerSecondary buffer isn't double freed or freed too early
...
- Call buf_init in StartAsync so we have access to a KestrelThread
2015-11-04 16:21:29 -08:00
Stephen Halter
74f08c16df
Merge branch 'benaadams/listenersecondary-allocs' into dev
2015-11-04 15:34:42 -08:00
Ben Adams
3e7969cefe
Move handle creation to constructor
2015-11-04 22:44:30 +00:00
Stephen Halter
272ce27c79
Merge branch 'benaadams/delegates' into dev
2015-11-04 14:21:13 -08:00
Ben Adams
5cef608e52
Dispose _ptr
2015-11-04 22:20:51 +00:00
Stephen Halter
35bbddf9b5
Merge branch 'benaadams/listener-primary-alloc' into dev
2015-11-04 10:14:52 -08:00
Stephen Halter
04b2885f10
Merge branch 'benaadams/listener-allocation' into dev
2015-11-04 10:12:33 -08:00
Stephen Halter
f4be290d4a
Merge branch 'benaadams/connection-allocs' into dev
2015-11-04 10:08:36 -08:00
Ben Adams
cc84097016
Listener - remove closure allocation
2015-11-04 12:36:32 +00:00
Ben Adams
1d4b9d6633
ListenerPrimary - reduce closure allocation
...
Still captures string pipeName
2015-11-04 12:33:51 +00:00
Ben Adams
d104e8a08d
Reduce delegate allocation
2015-11-04 12:31:44 +00:00
Ben Adams
34c1a671f0
ListenerSecondary - reduce closure allocation
2015-11-04 12:20:00 +00:00
Ben Adams
c113c0d3a2
Don't alloc array per header
...
i.e `new StringValues(string)` rather than `new StringValues(new [] {
string } )`
2015-11-04 07:11:55 +00:00
Ben Adams
ea6f6b10dc
Don't capture connection on closure
2015-11-01 13:27:17 +00:00
John Luo
b466c3b7d7
Reacting to Hosting changes
2015-10-30 14:19:55 -07:00
Stephen Halter
fe654598f6
Merge branch 'release' into dev
2015-10-29 14:30:02 -07:00
Troy Dai
e9a6061023
Make Frame implements IHttpConnectionFeature
...
Provide RemoteIPAddress as well as RemotePort
2015-10-29 10:08:35 -07:00
Ben Adams
bdadc8a3da
Move comment into loop, remove noop
2015-10-28 22:44:35 +00:00
Ben Adams
4bba074d77
Read to null buffer
...
Read to null buffer rather than Stream.Null as the CopyToAsync will
create a `new byte[]` on each call
bc14660885/src/mscorlib/src/System/IO/Stream.cs (L218)
of size 81920 bytes!
bc14660885/src/mscorlib/src/System/IO/Stream.cs (L48)
2015-10-28 08:53:11 +00:00
Stephen Halter
fb01ea3918
Consume the full request body when the app does not
2015-10-26 11:13:07 -07:00
Stephen Halter
094b8efbf8
Properly handle headers with empty values
2015-10-25 01:40:22 -07:00
Troy Dai
52f4fa91e3
Unescape string in memory
...
1. In place unescape;
1. UTF-8 verification;
2. MemoryPoolIterator2.Put
3. Tests
2015-10-23 15:26:59 -07:00
Ryan Nowak
f88631efb3
React to breaking changes in StringValues
2015-10-23 15:05:09 -07:00
Pranav K
dea782163d
Updating packages to use generations
2015-10-22 15:18:49 -07:00
Troy Dai
a1e4e022b9
Clean up
2015-10-21 22:08:03 -07:00
Stephen Halter
8f0d1179ab
Allow Nagle’s algorithm to be disabled via IKestrelServerInformation.NoDelay
2015-10-19 12:44:21 -07:00
Stephen Halter
c809beec18
Don't allocate Exceptions unnecessarily
...
- Allocate Exceptions in the ReadStart callbacks if necessary instead
of in UvStreamHandle.
- This also fixes a bug in ListenerSecondary where it should have
previously been looking at the error code instead of the read count.
#237
2015-10-16 15:25:37 -07:00
Stephen Halter
8e818e3549
Address PR feedback
2015-10-15 16:52:37 -07:00
Stephen Halter
7b315d2470
Close connection gracefully in Frame.ProduceEnd
...
- Try sending a FIN before closing the socket
- Don't attempt to send a FIN twice for the same connection
2015-10-15 15:35:40 -07:00
Stephen Halter
513abb4561
Log errors in OnStarting and OnCompleted
2015-10-15 15:35:38 -07:00
Stephen Halter
b98425d3b1
Log unhandled exceptions thrown from the AppFunc
2015-10-15 15:35:36 -07:00
Stephen Halter
7c27c5c0e7
Better handle blocks not taken taken from slabs
...
- If the block needs to be larger than 4032 bytes it won't be backed by a slab
2015-10-14 16:05:35 -07:00
Chris R
cfe6e22a29
React to IHeaderDictionary changes.
2015-10-12 09:29:34 -07:00
Stephen Halter
3eec43a0c3
Move static BitCount method to base class
...
- Updated comment to point to a specific commit in corefx
- This is more consistent with AppendValue since BitCount doesn't need
to be generated
2015-10-09 17:27:33 -07:00
Stephen Halter
a33a5d0f1b
Merge branch 'benaadams/bitcount-fast' into dev
2015-10-09 17:17:03 -07:00
Louis DeJardin
78177e7082
Fixing rebase errors
2015-10-09 13:26:34 -07:00
Louis DeJardin
6ae0f5d505
PR feedback - code formatting
2015-10-09 13:19:10 -07:00
Louis DeJardin
29b0b124ee
Moving non-changing methods into .cs partial
2015-10-09 13:19:09 -07:00
Ben Adams
ccfeef6353
All features to have backing object
2015-10-09 13:18:32 -07:00
Ben Adams
8f41e47eca
Remove bitfield for locally implemented interface items
...
Only generate type statics for cached features
2015-10-09 13:18:09 -07:00
Ben Adams
3c20053d9a
Don used cached typeof for tests
2015-10-09 13:15:39 -07:00
Ben Adams
56893df7f9
Don't iterate overriden features twice
2015-10-09 13:11:48 -07:00
Louis DeJardin
cbc3b4e6f5
PR Feedback
...
* Sorting namespaces
* Removing `as` casting for Frame's implemented interfaces
2015-10-09 13:10:27 -07:00
Ben Adams
6b0fa776ca
More comment clarity
2015-10-09 12:16:54 -07:00
Ben Adams
47973541b5
Remove redundant cast
2015-10-09 12:16:53 -07:00
Ben Adams
e107c47913
Add comment explanation
2015-10-09 12:16:52 -07:00
Ben Adams
05702e81e6
more typeof caching
2015-10-09 12:16:50 -07:00
Ben Adams
d48a27dd59
Use bitflag for override and cache typeof in statics
2015-10-09 12:16:49 -07:00
Louis DeJardin
dcf591c832
Rough implementation of feature collection optimization
2015-10-09 12:16:48 -07:00
Ben Adams
4250d35347
PR feeback
2015-10-08 01:11:41 -04:00
Ben Adams
8bf2c814d6
Add BitCount LongExtensions
2015-10-07 12:23:20 -04:00
Stephen Halter
2f3a00625a
Initial work to support HTTPS using SslStream
...
- Add extension method "UseKestrelHttps" to IApplicationBuilder
2015-10-05 03:15:18 -07:00
Pranav K
49451fb11e
Renaming Microsoft.Framework.* -> Microsoft.Extensions.*
2015-10-03 15:44:45 -07:00
Stephen Halter
6d3e5d3bf2
Merge branch 'benaadams/fastpath-header-enumerator' into dev
2015-09-28 12:21:58 -07:00
Stephen Halter
f0137b7b9e
Bind to specific IP addresses if provided with any
...
This still only applies to IPv4.
#98
2015-09-25 16:26:01 -07:00