Ben Adams
ef5ad3deea
defaullt(MemoryPoolIterator) test coverage
2016-11-21 22:48:58 +00:00
Ben Adams
2011a27bde
Use ternary op rather than lazy and
2016-11-21 22:48:57 +00:00
Ben Adams
8ce47fb8b6
Move perf, share code
2016-11-21 22:48:57 +00:00
Ben Adams
5041d6c291
wasLastBlock adjustments
2016-11-21 22:48:57 +00:00
Ben Adams
7ab4442392
Feedback + Cleanup
2016-11-21 22:48:57 +00:00
Ben Adams
4cdcca212e
Don't inline slow paths
2016-11-21 22:48:57 +00:00
Ben Adams
12e2f30577
MemoryPoolIterator byref structs
2016-11-21 22:48:57 +00:00
Ben Adams
53f361160e
MemoryPoolIterator fast paths
2016-11-21 22:48:57 +00:00
Ben Adams
8bcbfb9971
Only LocateFirstFoundByte once
2016-11-21 22:48:57 +00:00
Ben Adams
28a21fa7a9
Move vectors closer to use
2016-11-21 22:48:57 +00:00
Ben Adams
00a63537cf
And=> xor, powerOfTwoToHighByte to const
2016-11-21 22:48:57 +00:00
Ben Adams
97d4406614
Use Vector<byte>.ctor workaround
2016-11-21 22:48:57 +00:00
Ben Adams
972d978d11
Swap for vector loop unroll detection
2016-11-21 22:48:57 +00:00
Ben Adams
9eb01d1c57
Reduce Vector register pressure by not overlapping
2016-11-21 22:48:57 +00:00
Ben Adams
4f7977d440
Use PowerOfTwoToHighByte for FindFirstEqualByte
2016-11-21 22:48:57 +00:00
Stephen Halter
0c26fc9f41
Merge branch 'rel/1.1.0' into dev
2016-11-11 15:16:48 -08:00
Stephen Halter
f1d0fafaa4
Better filter clients connecting to Kestrel's dispatch pipes
2016-11-11 14:57:17 -08:00
Stephen Halter
4a1db74568
Merge branch 'rel/1.1.0' into dev
2016-11-09 14:29:31 -08:00
Stephen Halter
e780ad9516
Ensure clients connecting to Kestrel's dispatch pipe are listeners
2016-11-09 14:26:47 -08:00
Pranav K
9d081d17e5
Updating versions to 1.2.0-*
2016-11-09 14:18:16 -08:00
Stephen Halter
757952d4d3
Always flush headers on first response write ( #1202 ).
2016-11-09 14:02:50 -08:00
Stephen Halter
c0e75dcbf8
Always flush headers on first response write ( #1202 ).
2016-11-09 13:59:12 -08:00
Stephen Halter
194059a198
Implement Begin/End Read/Write methods in LoggingStream
...
- This allows the reads and writes from SslStream to be logged on desktop .NET
2016-11-04 21:38:57 -07:00
Stephen Halter
0d559468f1
Make connection reset logs less scary
...
- Particularly between requests, connection resets aren't that abnormal.
2016-11-04 21:36:51 -07:00
Cesar Blum Silveira
a83bbcfba7
Prevent block leak when socket is closed before connection filter is applied.
2016-11-04 20:56:01 -07:00
Cesar Blum Silveira
a1c598733b
Reject POST and PUT requests with no Content-Length or Transfer-Encoding ( #1130 ).
2016-11-04 18:04:27 -07:00
jacalvar
ed98894c93
Created public API baselines
2016-11-04 17:16:22 -07:00
Stephen Halter
6cbbb73ca7
Protect against NullReferenceException in Frame.StopStreams()
2016-11-04 16:01:07 -07:00
Stephen Halter
b3aca0413c
Avoid zero-length writes to flush connection filter stream
...
- This works around a zero-length write bug in SslStream.
- We already assume connection filter streams auto flush.
#1195
2016-11-04 15:43:35 -07:00
Pranav K
0dcfa2a3fd
Updating to Libuv 1.9.1
2016-11-03 10:08:01 -07:00
Ben Adams
2adb6ff955
Interlocked.Read -> Volatile.Read
2016-11-01 18:06:00 -04:00
Cesar Blum Silveira
29408956f9
Handle tokens in Transfer-Encoding header ( #1181 ).
2016-10-31 13:57:34 -07:00
Stephen Halter
5e97c63467
Throw PlatformNotSupportedException on big-endian platforms
2016-10-28 14:51:55 -07:00
Stephen Halter
d475d41f71
Fix boundary cases in MemoryPoolIterator.(Try)PeekLong()
...
- Fix edge case where the iterator is at the very end of a block.
- Fix edge case where one bits where improperly filled in on a right shift.
- Don't use -1 to represent failure. Use bool and an out parameter instead.
2016-10-28 14:51:47 -07:00
Cesar Blum Silveira
1ffad5ca38
Handle multiple tokens in Connection header ( #1170 ).
2016-10-27 12:19:43 -07:00
Cesar Blum Silveira
d64b4c7acb
Control-flow simplification in Frame.CreateResponseHeader() ( #1168 ).
2016-10-24 11:07:06 -07:00
Nathan Anderson
610601cc6e
test fixes and whitespace changes to generated code
2016-10-20 15:23:03 -07:00
Nathan Anderson
11ed34f229
add header ordering and short circuits to known headers
...
refactor known header changes
- create template string from Append switch
- add a check to ClearFast to bail out if too many headers are set
2016-10-19 15:49:01 -07:00
Cesar Blum Silveira
fff0adeaaf
Faster response Content-Length parsing.
2016-10-18 15:57:40 -07:00
Cesar Blum Silveira
78584799a4
Separate request rejection from bad request state setting.
2016-10-17 15:16:50 -07:00
Mike Harder
f1071dea50
Set StatusCode before disposing HttpContext ( #876 )
2016-10-17 15:16:43 -07:00
Cesar Blum Silveira
bf94f8526a
Remove TCP Loopback Fast Path code ( #1147 ).
2016-10-12 11:41:57 -07:00
Cesar Blum Silveira
ffc3eb3afd
HEAD response can include Content-Length header.
2016-10-12 11:38:18 -07:00
Stephen Halter
ce6e65b1d7
Don't take SocketOutput's _contextLock to return written blocks
2016-10-11 16:39:13 -07:00
Cesar Blum Silveira
a15b1e2805
Update cached Content-Length when setting raw header.
2016-10-11 13:55:05 -07:00
Cesar Blum Silveira
f8813a600d
Handle response content length mismatches ( #175 ).
2016-10-11 13:25:22 -07:00
Cesar Blum Silveira
6c2532682a
Merge branch 'benaadams/callstack' into dev
2016-10-10 14:42:22 -07:00
Cesar Blum Silveira
3177ba0aae
Wait for frame loop completion to dispose connection stream ( #1156 ).
2016-10-10 10:16:03 -07:00
Ben Adams
adc3e63ecc
Improve callstack for LoggingThreadPool
2016-10-08 05:14:00 +01:00
Kristian Hellang
03f8a7a217
Use HeaderUtilities.FormatDate in DateHeaderValueManager ( #1132 )
2016-10-06 11:56:49 -07:00
Cesar Blum Silveira
2c94884da9
Include address in error message when address already in use ( #1086 ).
2016-10-05 14:23:09 -07:00
Pranav K
91497621c9
Updating partner package versions
2016-10-03 19:59:39 -07:00
Cesar Blum Silveira
a2439105ae
Refactor request line validation and error reporting ( #1116 ).
2016-10-03 16:54:51 -07:00
Cesar Blum Silveira
4117ad8a1e
Refactor non-body response handling.
...
- Add functional tests
- Remove BadHttpResponse, ResponseRejectionReasons and TestFrameProtectedMembers
- Chunk non-keepalive HTTP/1.1 responses
- Set _canHaveBody to true when StatusCode == 101
- Add test to check that upgraded connections are always closed when the app
is done
- Log writes on responses to HEAD requests only once.
2016-10-03 16:46:59 -07:00
Ben Adams
e7e6b896ba
Don't emit TE header or body for non-body responses
2016-10-03 15:54:14 -07:00
Cesar Blum Silveira
e8fa40235b
Remove unused variable in MemoryPoolIterator.Seek() ( #1137 ).
2016-10-03 14:22:10 -07:00
Mikael Mengistu
12adc7de9d
Refactored to use the fields from the HttpMethods class
...
* Reacting to PR comments
2016-09-29 12:19:26 -07:00
Ben Adams
310411075f
Slimmer locks
2016-09-28 15:33:34 -07:00
Cesar Blum Silveira
09fda749b0
Don't reset frame state when connection is aborted ( #1103 ).
2016-09-28 15:06:22 -07:00
Cesar Blum Silveira
73656f6503
Assume zero length on non-keepalive requests without Content-Length or Transfer-Encoding ( #1104 ).
2016-09-28 12:30:53 -07:00
Cesar Blum Silveira
0312da7df3
Add request headers timeout ( #1110 ).
2016-09-27 17:08:02 -07:00
Stephen Halter
7b2f7b94ab
Return last block from SocketOutput when data is fully written
...
- This reduces Kestrel's memory usage for idle connections.
2016-09-27 15:57:45 -07:00
Stephen Halter
0edf36bd21
Return last block from SocketInput when data is fully consumed
...
- This reduces Kestrel's memory usage for idle connections.
2016-09-27 15:57:45 -07:00
Cesar Blum Silveira
375e8b7022
Change context relationships from inheritance to composition.
2016-09-27 11:53:06 -07:00
David Fowler
78c859d7ea
Turn on warnings as errors
2016-09-25 12:25:12 -07:00
David Fowler
67930753df
Merge pull request #1123 from svick/sockaddr-sequential
...
Specify sequential layout to avoid warning
2016-09-25 10:49:10 -07:00
Petr Onderka
782f96572d
Specify sequential layout to avoid warning
2016-09-25 18:13:42 +02:00
Cesar Blum Silveira
49ff98f8cb
More specific response status codes for errors ( #653 ).
...
- 414 when request line exceeds size limit
- 431 when request headers exceed size or count limits
- 505 when request line contains unsupported HTTP version
2016-09-22 12:13:14 -07:00
Stephen Halter
63509b9e10
Make FrameRequestStream.CopyToAsync(...) copyless
...
- Add tests for when the CopyToAsync destinationStream throws.
- Add test to verify the destination stream sees the same array written to by
the producer.
2016-09-20 11:54:58 -07:00
Cesar Blum Silveira
1a273f5a34
Improve keep-alive timeout.
...
- Track time more accurately
- Control timeout in Connection instead of Frame
2016-09-14 20:57:16 -07:00
Stephen Halter
2fbf0c6281
Merge branch 'DamirAinullin/single-initialize' into dev
2016-09-12 10:34:35 -07:00
Cesar Blum Silveira
8c513402a3
Always call ConsumingComplete() with furthest examined position ( #1095 ).
2016-09-10 20:05:14 -07:00
Pavel Krymets
c777a9efea
Use TaskCache class from Microsoft.Extensions.TaskCache.Sources ( #1089 )
...
Instead of Task.FromResult(0)
2016-09-09 15:57:33 -07:00
DamirAinullin
0491b49268
Remove double initializing of variable _field3
2016-09-07 14:23:06 +03:00
Cesar Blum Silveira
f2085b1968
Add keep-alive timeout ( #464 ).
2016-09-06 12:48:47 -07:00
Cesar Blum Silveira
19f8958fa8
Move TestServer to shared directory.
2016-09-06 12:47:24 -07:00
David Fowler
6795ca2f78
Make the char array for utf8 decoding smaller
2016-08-31 18:54:15 -07:00
Stephen Halter
1ecef8094a
Make Kestrel's response buffer limit configurable
2016-08-30 16:01:42 -07:00
Stephen Halter
acfcafb6e1
Ensure MockLibuv.OnPostTask doesn't complete too early
2016-08-29 20:53:00 -07:00
Stephen Halter
0742d113be
Make all calls to ThreadPool.QueueUserWorkItem through IThreadPool
...
- This allows SocketOutputTests to cause QUWI to exec synchronously
- To avoid allocations, the logger can't be captured making it "unsafe"
2016-08-29 20:52:47 -07:00
Stephen Halter
08d7f66108
Merge branch 'benaadams/less-unsafe' into dev
2016-08-26 14:44:18 -07:00
Ben Adams
be51e5aecb
Remove unneeded unsafe modifiers
2016-08-25 08:07:15 +01:00
Ben Adams
7dc0a8c7bd
Return count from trywrite
2016-08-25 07:58:36 +01:00
Ben Adams
af73e519c1
Comment inlinability changes
2016-08-25 07:53:01 +01:00
Ben Adams
40636998d7
Improve inlinability of libuv success checking
2016-08-21 13:48:35 +01:00
Stephen Halter
7bd30ea693
Log all startup errors in KestrelServer
2016-08-18 14:52:26 -07:00
Stephen Halter
972be6e8c1
Disable automatic chunking for all non keep-alive requests
...
- Fixes a bug where Upgrade requests (e.g. WebSockets) would be chunked
- Allows chunking to be disabled by setting "Connection: close" on the response
2016-08-17 12:39:18 -07:00
Stephen Halter
16fbb94c44
Automatically chunk and set 0 Content-Length for non keep-alive responses
2016-08-15 16:27:54 -07:00
Stephen Halter
5f4e60bf8d
Always set "Connection: close" header for non keep-alive responses
2016-08-15 16:27:54 -07:00
Cesar Blum Silveira
08a91f17bf
Call OnStarting and OnCompleted callbacks in LIFO order ( #1042 ).
2016-08-10 14:52:05 -07:00
Cesar Blum Silveira
08f98f4790
Add header limit options ( #475 ).
2016-08-09 12:31:39 -07:00
Cesar Blum Silveira
a5aacd6307
Throw when setting OnStarting after response has already started ( #806 ).
2016-08-08 11:38:06 -07:00
Cesar Blum Silveira
140dc6fcf5
Add obsoletion reason for KestrelServerOptions.MaxRequestBufferSize.
2016-08-04 10:46:42 -07:00
Stephen Halter
9727a4db86
Improve the performance of connection filters
...
- Buffer connection filter input less by using ProducingStart/Complete
- Simplify FilteredStreamAdapter
2016-08-03 16:45:39 -07:00
Stephen Halter
5aee524768
Ensure Begin/End Read/Write methods are correctly implemented
...
- Add Begin/End Write methods to FrameResponseStream
- Fix state check of Begin/End Read methods in FrameRequestStream
2016-08-03 16:45:39 -07:00
Stephen Halter
4337d2a4a7
Implement Begin/End Read/Write methods in LibuvStream
2016-08-03 16:45:39 -07:00
Cesar Blum Silveira
8836eec7d8
Limit request line length ( #784 ).
2016-08-03 15:39:16 -07:00
Stephen Halter
dfe12223b8
Ensure HTTPS handshake errors aren't logged on socket close
2016-08-03 15:21:57 -07:00
Stephen Halter
1020d69171
Better logging for connection errors during HTTPS handshake
2016-08-03 11:15:15 -07:00
Mike Harder
4ece3f4b68
Change "String." to "string." to match coding convention
2016-08-01 11:09:31 -07:00