Cesar Blum Silveira
973b705cdb
Disable tests that hang on SslStream.WriteAsync after update to CoreFx 4.4.
2016-12-22 18:37:14 -08:00
Ben Adams
4c0413c804
Implement Stream Flush+FlushAsync fully
...
Streams should pass through the flush and not assume the underlying
Stream's Flush behaviour
2016-12-22 13:40:40 +00:00
Pranav K
5b8f7c2b2b
Updating to 4.4 CoreFx packages
2016-12-21 22:22:13 -08:00
Cesar Blum Silveira
461caa85f4
Test RequestHeadersTimeout in KestrelServerLimitsTests.RequestHeadersTimeoutValid ( #1268 ).
2016-12-21 13:22:20 -08:00
Cesar Blum Silveira
b41c4078bd
Abort connections not closed during shutdown ( #1112 ).
2016-12-20 14:44:34 -08:00
Cesar Blum Silveira
4485bfec39
Fix test races caused by cedbe76.
2016-12-13 13:57:26 -08:00
Cesar Blum Silveira
cedbe76f52
Abort request on client FIN ( #1139 ).
2016-12-13 12:03:33 -08:00
Cesar Blum Silveira
51ecbd7949
Add benchmarks for Frame writes.
2016-12-13 11:33:56 -08:00
Cesar Blum Silveira
defcbdb907
Revert "Add MaxRequestBodySize limit ( #478 )."
...
This reverts commit e53a87be9c .
2016-12-09 16:30:12 -08:00
Cesar Blum Silveira
e53a87be9c
Add MaxRequestBodySize limit ( #478 ).
2016-12-05 17:06:57 -08:00
Stephen Halter
02b84d7ae1
Make ListenerPrimaryTests more reliable
...
- The Task from ListenerSecondary.StartAsync() may complete before the
PrimaryListener adds the pipe connection to its dispatch pipe list.
2016-11-28 14:37:25 -08:00
N. Taylor Mullen
fd7232616a
Pin global.json SDK to 1.0.0-preview2-1-003177.
2016-11-23 15:59:21 -08:00
Pavel Krymets
e55c62444b
Refactor FrameTests and rename SocketInput SocketOutput properties ( #1229 )
2016-11-22 16:36:36 -08:00
Stephen Halter
b2d45c3dd0
Make TestApplicationErrorLogger thread-safe
2016-11-21 16:31:27 -08:00
Ben Adams
2eba4017c1
MemoryPoolIterator feedback
2016-11-21 22:48:58 +00:00
Ben Adams
9ec4d88fbe
Improve Skip coverage
2016-11-21 22:48:58 +00:00
Ben Adams
ba0b7cc553
Add 100% coverage Take tests
2016-11-21 22:48:58 +00:00
Ben Adams
dc90dd1649
Add GetArraySegment test
2016-11-21 22:48:58 +00:00
Ben Adams
ef5ad3deea
defaullt(MemoryPoolIterator) test coverage
2016-11-21 22:48:58 +00:00
Ben Adams
8ce47fb8b6
Move perf, share code
2016-11-21 22:48:57 +00:00
Ben Adams
12e2f30577
MemoryPoolIterator byref structs
2016-11-21 22:48:57 +00:00
Ben Adams
8bcbfb9971
Only LocateFirstFoundByte once
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
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
ec89197ecb
Add ListenerPrimaryTests
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
5043f9b17a
Make ConnectionFilterTests more reliable
2016-11-09 14:02:51 -08:00
Stephen Halter
757952d4d3
Always flush headers on first response write ( #1202 ).
2016-11-09 14:02:50 -08:00
Stephen Halter
3c7e7d1f6c
Make ConnectionFilterTests more reliable
2016-11-09 13:59:12 -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
Cesar Blum Silveira
5b65117b64
Add functional regression test for 'Connection: keep-alive, upgrade' request header.
2016-11-04 17:54:22 -07:00
Stephen Halter
8591900849
Fix more test failures caused by connection resets
...
- Avoid sending data that won't be processed.
2016-11-04 16:05:11 -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
Cesar Blum Silveira
29408956f9
Handle tokens in Transfer-Encoding header ( #1181 ).
2016-10-31 13:57:34 -07:00
Cesar Blum Silveira
cc05e36dc6
Fix test failures caused by connection resets ( #1167 ).
2016-10-31 10:21:28 -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
Nathan Anderson
610601cc6e
test fixes and whitespace changes to generated code
2016-10-20 15:23:03 -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
Pranav K
2876f82521
Updating to netcoreapp1.1
2016-10-13 11:19:16 -07:00
Pranav K
e2f11ebd38
Revert "Updating to netcoreapp1.1"
...
This reverts commit dd23f24241 .
2016-10-12 16:08:56 -07:00
Pranav K
dd23f24241
Updating to netcoreapp1.1
2016-10-12 13:45: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
Cesar Blum Silveira
7ee13875b1
Reduce delay variability in KeepAliveTimeoutTests.ConnectionKeptAliveBetweenRequests() ( #1157 ).
2016-10-11 16:22:59 -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
Pranav K
8c103f0f23
Revert "Revert to Microsoft.NETCore.App to 1.0.0"
...
This reverts commit f1f66448f4 .
2016-10-10 19:23:37 -07:00
Cesar Blum Silveira
3177ba0aae
Wait for frame loop completion to dispose connection stream ( #1156 ).
2016-10-10 10:16:03 -07:00
Cesar Blum Silveira
663b825d97
Merge branch 'benaadams/codecoverage' into dev
2016-10-06 15:01:43 -07: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
Ben Adams
2708b8a534
Add CodeCoverage to tests
2016-10-05 21:42:31 +01:00
Pranav K
f1f66448f4
Revert to Microsoft.NETCore.App to 1.0.0
2016-10-05 12:03:46 -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
Mikael Mengistu
12adc7de9d
Refactored to use the fields from the HttpMethods class
...
* Reacting to PR comments
2016-09-29 12:19:26 -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
Cesar Blum Silveira
375e8b7022
Change context relationships from inheritance to composition.
2016-09-27 11:53:06 -07: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
afa89b3993
Change SkipReason for ThreadCountTests on OS X.
2016-09-16 09:09:26 -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
84efe624a6
Fix deadlock in HttpsTests
...
- The xunit synccontext was saving us again
2016-09-12 11:06:29 -07:00
Stephen Halter
39bd49ea1a
Avoid blocking the MockLibuv loop with test code
...
- This allows for a graceful shutdown with dotnet test -Parallel None
- By default, the xunit synccontext will dispatch automatically off
the KestrelThread, but it's best not to rely on this behavior.
2016-09-12 11:06:29 -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
Cesar Blum Silveira
5b2065230d
Fix failing keep-alive timeout tests.
2016-09-07 20:58:00 -07: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
Cesar Blum Silveira
5512516ee8
Remove commented test.
2016-09-01 17:18:59 -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
4587a0fc95
Prevent possible deadlocks when using MockLibuv.OnPostTask
2016-08-29 12:14:19 -07:00
Cesar Blum Silveira
b6a177ef0b
Test for categoryName passed to ILoggerFactory.CreateLogger() in KestrelServer.ctor() ( #797 )
2016-08-26 15:37:15 -07: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
Stephen Halter
8f4cc3003b
Improve SocketOutputTests
...
- This should increase reliability/determinism by removing timeouts.
2016-08-15 10:58:32 -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
5181e4196c
Trace call to _uv_unsafe_async_send in MockLibuv.
2016-08-09 18:26:10 -07:00
Cesar Blum Silveira
08f98f4790
Add header limit options ( #475 ).
2016-08-09 12:31:39 -07:00
Pranav K
2f9bf9bb87
Updating to Moq \ Castle.Core that does not require imports
2016-08-08 14:35:04 -07:00
Cesar Blum Silveira
f2fa8b5660
Add functional test.
2016-08-08 11:58:37 -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
55f409b38b
Fix hanging functional tests.
2016-08-05 16:46:34 -07:00
Cesar Blum Silveira
fa41588779
Move server start failure test in MaxRequestLineSizeTests to KestrelServerTests.
2016-08-04 15:43:53 -07:00
Cesar Blum Silveira
b8f21bee03
Update warning code for obsolete property in #pragma.
2016-08-04 14:05:23 -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
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
Cesar Blum Silveira
20c1bb567d
Move TestConnection to the Microsoft.AspNetCore.Testing namespace.
2016-08-02 12:47:06 -07:00
Cesar Blum Silveira
5876e1983a
Move TestConnection to shared directory.
2016-08-02 12:30:53 -07:00
Cesar Blum Silveira
138f23b246
Remove TestServer dependency from TestConnection.
2016-08-02 12:26:17 -07:00
Mike Harder
4ece3f4b68
Change "String." to "string." to match coding convention
2016-08-01 11:09:31 -07:00
Stephen Halter
00a540dcb8
Merge branch 'benaadams/more-block-collect-info' into dev
2016-07-28 16:51:35 -07:00
Stephen Halter
5d6da35cb9
Add test verifying a chunked response can be written manually
2016-07-28 16:43:23 -07:00
Stephen Halter
3a67cb9df5
Merge branch 'benaadams/enum-rather-than-string' into dev
2016-07-25 10:30:33 -07:00
Ben Adams
0ab04d7e73
Tests to makes sure known strings are interned
2016-07-23 01:07:04 +01:00
Ben Adams
0a1ea124ee
Use HttpVersionType enum rather than string compare
2016-07-22 21:34:49 +01:00
David Fowler
0e7967a7fc
Allocate things per KestrelThread instead of per listener
...
- Moved things that have loop affinity to KestrelThread like
WriteReqPool, MemoryPool and the ConnectionManager
- Changed on the listeners to only kill the ListenSocket, not the
connections on dispose
- Moved connection disposal to KestrelThread.Stop
- Simplify the connection manager logic so it's possible to walk and
wait in a single call
2016-07-21 22:17:18 -07:00
Cesar Blum Silveira
3c0e0f8d88
Always throw same exception type on read after connection error ( #975 ).
2016-07-21 16:33:56 -07:00
Ben Adams
7b8abf5a3e
Improved Memoryblock tracking
...
Also fixed 3 tests that weren't handling block properly
2016-07-21 01:13:27 +01:00
Cesar Blum Silveira
bdf9f8dd4e
Wait for connection in RequestTests.ConnectionResetAbortsRequest ( #978 ).
2016-07-18 13:29:42 -07:00
Mike Harder
41e50ba688
Enable all tests in HttpsConnectionFilterTests to run on all platforms
...
- Move HttpClientSlim.cs to test\shared
- Change HttpClientSlim to static class to simplify calling code
- Add HttpClientSlim.PostAsync()
2016-07-18 12:38:19 -07:00
Cesar Blum Silveira
3bb7f4e2c4
Treat ECONNRESET as a connection error ( #934 ).
2016-07-15 14:53:21 -07:00
Stephen Halter
fbcb5dcb1b
Prevent enumeration of queue during modification in SocketOutputTests
2016-07-15 11:53:54 -07:00
Mike Harder
0c52529b97
Add tests for HTTPS urls to AddressRegistrationTests ( #794 )
...
- Added HttpClientSlim, a lightweight version of HttpClient implemented using Socket and SslStream.
2016-07-14 18:35:47 -07:00
Stephen Halter
7e1aa4e1d0
Only test binding to "operational" network interfaces
2016-07-14 16:08:39 -07:00
Mike Harder
2f36c80970
Remove skip condition for IPv6 with scope ID on Linux and Mac ( #964 )
...
- Was required to workaround https://github.com/dotnet/corefx/issues/8235 which is now fixed.
2016-07-11 17:53:59 -07:00
Mike Harder
8a43be94ef
AddressRegistrationTests should get local IPs from System.Net.NetworkInformation ( #796 )
2016-07-11 14:40:12 -07:00
Doug Bunting
82a0a99107
One build to rule them all
...
- well, at least VS and command-line builds will share output
- part of aspnet/Coherence-Signed#277
2016-07-07 12:07:14 -07:00
Cesar Blum Silveira
9f720eda90
Reset frame streams on each request ( #940 ).
2016-07-06 14:57:43 -07:00
Pranav K
a09bce0c07
Updating to RTM builds of xunit and Moq
2016-06-30 16:00:39 -07:00
Pranav K
de668c2ebd
Updating to dev versions
...
# Conflicts:
# test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/project.json
2016-06-16 10:40:58 -07:00
jacalvar
6b7e27269c
Update Json.NET to 9.0.1
2016-06-15 15:08:50 -07:00
Mike Harder
5ecb1f59a4
Limit size of memory buffer when reading request ( #304 )
...
- Added property `KestrelServerOptions.MaxRequestBufferSize`
- Default is 1,048,576 bytes (1MB)
- If value is null, the size of the request buffer is unlimited.
- Fixed bug in `IConnectionControl.Resume()` where `_socket.ReadStart()` can throw if the socket is already disconnected.
- Made `UvStreamHandle.ReadStop()` idempotent, to match `uv_read_stop()`.
2016-06-13 18:52:20 -07:00
Cesar Blum Silveira
98feee9dbd
Combine LargeMultipartUpload and LargeUpload into one test.
2016-06-13 17:55:19 -07:00
N. Taylor Mullen
917c3e0987
Remove direct Microsoft.NETCore.Platforms dependency.
...
- Microsoft.NETCore.App now pulls this package in.
aspnet/Coherence-Signed#344
2016-06-13 15:29:13 -07:00
Stephen Halter
c1dadbd723
Make Bad Request tests more reliable
...
- Avoid calling write again after the request is already rejected
- Don't try to close a socket from the client if we already expect the server
to forcefully close the socket
2016-06-07 16:13:29 -07:00
jacalvar
b6ceac559a
Update Json.NET to 9.0.1-beta1
2016-06-06 21:25:52 -07:00
moozzyk
50e8948bb9
Fixing BadRequest tests to not try sending data after Bad Request
2016-06-06 15:27:45 -07:00
moozzyk
69bd0dc4be
Reject requests that have null characters in path
2016-06-06 09:59:42 -07:00
Cesar Blum Silveira
2bbaa52b08
Disable ThreadCountTests on Mac.
2016-06-03 19:57:28 -07:00
Andrew Stanton-Nurse
09f5be1434
fix #909 by moving most classes to Internal ns
2016-06-03 14:14:21 -07:00
moozzyk
ef74926463
Fixing a test failing on Mac and Linux
2016-06-03 12:21:48 -07:00
Stephen Halter
6bff2ecb34
Small cleanup to SocketOutput's shutdown logic
2016-06-02 16:54:00 -07:00
Stephen Halter
07744e75d9
Gracefully handle connection close in SocketOutput.ProducingComplete
2016-06-02 16:54:00 -07:00
Stephen Halter
2d229e8980
Allow a maximum of 3 concurrent uv_write operations per connection
...
- Keep logic to prevent unnecessary calls to KestrelThread.Post
- This partially reverts commit 480996433e .
2016-06-02 16:52:06 -07:00
moozzyk
0342754c57
Using the optimized method for converting header name to ASCII
2016-06-02 16:36:22 -07:00
Cesar Blum Silveira
de022b6051
Improved handling of whitespace in headers.
2016-06-02 16:18:43 -07:00
Stephen Halter
9667907515
Prevent IOException from incorrectly failing test expecting 400 response
2016-06-02 12:22:05 -07:00
Chris R
6e36bbe32c
Add negative path tests.
2016-06-01 21:28:37 -07:00
Cesar Blum Silveira
58410bf016
Fix Travis build.
2016-06-01 16:52:38 -07:00
Stephen Halter
f609f41a7c
Reject non-ASCII chars in headers in addition to control chars
2016-06-01 16:01:15 -07:00
Pavel Krymets
bb92cc1c29
Fix NRE when aborting connection or client disconects
2016-06-01 15:52:05 -07:00
Chris R
6224f5b6e8
Perf: Remove unnecessary path checks
2016-06-01 14:56:49 -07:00
moozzyk
bcdd3147a1
Fixing "Error -4092 EACCES permission denied" in tests
...
A test is trying to bind to port 80 which fails if IIS is running on the machine
2016-05-31 18:55:29 -07:00
moozzyk
0753f06c28
Aborting request if a string can't be converted to ASCII
2016-05-31 17:11:31 -07:00
Cesar Blum Silveira
50208a3a79
Implement IHttpRequestFeature.RawTarget ( aspnet/HttpAbstractions#596 ).
2016-05-31 15:30:12 -07:00
Andrew Stanton-Nurse
290e1e3f3f
improve validation of HTTP methods
2016-05-31 14:13:13 -07:00
Mike Harder
306084356e
ServerAddress.FromUrl() should throw if Host is missing ( #860 )
2016-05-31 11:54:38 -07:00
John Luo
50e140da43
React to update CoreCLR packages
...
https://github.com/aspnet/Coherence/issues/97
2016-05-27 17:51:51 -07:00
Cesar Blum Silveira
0a181b1f3f
Reset Frame's IHttpRequestFeature.Headers and IHttpResponseFeature.Headers between requests ( #879 ).
2016-05-27 16:02:55 -07:00
Cesar Blum Silveira
6d3a416f0e
Test code nitpicks.
2016-05-27 15:02:32 -07:00
Cesar Blum Silveira
cea5fbbafa
Fix disabled tests in MultipleLoopTests.
2016-05-27 13:50:37 -07:00
Mike Harder
2453047fe2
ServerAddress.FromUrl() should throw for invalid url ( #875 )
2016-05-27 12:02:30 -07:00
Stephen Halter
b9b67f6bf4
Merge branch 'khellang/set-headers-on-response-start' into dev
2016-05-26 15:35:01 -07:00
Pavel Krymets
ef8b0a90d8
Fix merge formatting issues and cross plat tests
2016-05-26 10:34:25 -07:00
Kristian Hellang
72cc0ffbd5
Set Date and Server headers at response start
...
Closes #223
2016-05-26 17:38:16 +02:00
Pavel Krymets
71ecf5612f
Refactor and add ssl tests
2016-05-26 08:31:20 -07:00
Cesar Blum Silveira
a3d0bd0ec4
Bind to both IPv4 and IPv6 when localhost is specified ( #231 ).
2016-05-25 21:23:29 -07:00
Cesar Blum Silveira
3f4e2323f4
Throw when setting Frame.StatusCode or Frame.ReasonPhrase after response has already started ( #805 ).
2016-05-24 16:32:54 -07:00
Mike Harder
58070099fc
Remove Console.WriteLine() from MemoryPoolBlockTests ( #868 )
...
- Causes noise in test results
2016-05-24 11:38:24 -07:00
Mike Harder
5ca6592677
Don't bind if only port is specified ( #814 ) ( #861 )
...
- Also renamed ServerAddressFacts to ServerAddressTests to match existing test classes
2016-05-23 14:06:46 -07:00
Cesar Blum Silveira
925d8e0200
Always cache headers and streams across frames ( #754 ).
2016-05-20 16:16:19 -07:00
Stephen Halter
a38a437efb
Merge branch 'khellang/server-header-option' into dev
2016-05-20 15:56:29 -07:00
Stephen Halter
c39546352a
Merge branch 'shanewalters/remote-cert' into dev
2016-05-20 15:53:51 -07:00
Kristian Hellang
2ab01c09fd
Add option to remove the Server header
2016-05-20 13:18:18 +02:00
Cesar Blum Silveira
86567e1d93
Fix engine test.
2016-05-19 14:06:27 -07:00
shanewalters
b17c070e1c
Updated to not use handle, centralize conversion logic.
2016-05-19 14:40:29 -06:00
Ben Adams
e8647c0cb4
Remove extra FrameContext class
...
Resolves #837
2016-05-19 19:22:39 +01:00
Stephen Halter
7e7f21ec49
Merge branch 'benaadams/dateheader' into dev
2016-05-18 17:11:01 -07:00
Cesar Blum Silveira
8c8ee150f7
Send 'Connection: close' in all 400 responses to HTTP/1.1 requests ( #840 ).
2016-05-18 15:03:31 -07:00
Cesar Blum Silveira
3e841ccba1
Always send HTTP/1.1 responses ( #792 ).
2016-05-16 16:11:37 -07:00
Cesar Blum Silveira
2cd86a2724
Temporarily disable BadHttpRequestTests.
2016-05-12 14:55:56 -07:00
Cesar Blum Silveira
3186e1bd72
Make TakeStartLine more robust ( #683 ).
2016-05-12 12:07:08 -07:00
Ben Adams
a3b0f809de
Only call PrepareDateValues if not already called for tick
2016-05-10 20:38:27 +01:00
Stephen Halter
fed7c44829
Merge branch 'halter73/validate-header' into dev
2016-05-04 12:35:26 -07:00
Stephen Halter
faf81f11f5
Add response header validation tests
2016-05-04 12:26:00 -07:00
Mike Harder
14bbba0641
Update addresses in IServerAddressesFeature with assigned dynamic ports ( #758 )
...
- Change most tests to use dynamic ports, rather than a fixed port obtained from GetNextPort().
- Add several new cases to `AddressRegistrationTests` and `ServerAddressFacts`.
- Remove project `test\Microsoft.AspNetCore.Server.Kestrel.TestCommon`. It's not longer needed, since only `AddressRegistrationTests` uses `GetNextPort()`.
2016-05-04 11:27:23 -07:00
Stephen Halter
f8c2c2470f
Merge branch 'benaadams/memorypool' into dev
2016-05-02 21:58:53 -07:00
Pranav K
7494e6a10a
Merge branch 'release' into dev
2016-05-02 16:23:48 -07:00
Pranav K
296ca0f948
Fix build break
2016-05-02 16:22:54 -07:00
Pranav K
ff510875f2
Merge branch 'release' into dev
2016-05-02 14:56:30 -07:00
Pranav K
f0358182e4
Fix build warnings
2016-05-02 11:27:18 -07:00
Ben Adams
a31d847719
Tests only to use pooled blocks
2016-04-30 11:16:24 +01:00
Pranav K
98846a4cc7
Merge branch 'release' into dev
2016-04-27 17:34:21 -07:00
Pranav K
5135ee9d2d
Fixing CI build break
2016-04-27 17:34:01 -07:00
Justin Van Patten
8f7c0ff041
Minor Stream improvements
...
- Unsupported members should throw NotSupportedException instead of
NotImplementedException per MSDN docs for CanRead/CanSeek/CanWrite.
- Position should throw NotSupportedException when CanSeek is false.
- FrameRequestStream.Flush/FlushAsync should not throw
NotImplementedException.
- Use expression-bodied members for CanRead/CanSeek/CanWrite on
FrameRequestStream to match FrameResponseStream.
- Provide no-op override of LibuvStream.FlushAsync to match Flush.
2016-04-25 22:19:30 -07:00
Cesar Blum Silveira
00ee2145fc
Add xproj for Microsoft.AspNetCore.Server.Kestrel.TestCommon.
2016-04-21 14:51:37 -07:00
Cesar Blum Silveira
95722670c1
More robust port assignment for tests.
2016-04-20 17:25:50 -07:00
Cesar Blum Silveira
f29dd60999
Fix connection termination issues when using connection filters ( #737 , #747 ).
...
- If we're done before the client sends a FIN, force a FIN into the raw
SocketInput so the task in FileteredStreamAdapter finishes gracefully
and we dispose everything in proper order.
- If there's an error while writing to a stream (like ObjectDisposedException),
log it once and prevent further write attempts. This means the client closed
the connection while we were still writing output.
- This also fixes a bug related to the point above, where memory blocks were
being leaked instead of returned to the pool (because we weren't catching
the exception from Write()).
2016-04-19 22:04:33 -07:00
Pranav K
33ad355114
Use latest build of dotnet-test-xunit
2016-04-19 14:54:04 -07:00
Pavel Krymets
5273e0e768
Bring Microsoft.NETCore.Platforms dependency back
2016-04-18 17:01:20 -07:00
Mike Harder
0453e4af70
Add KestrelServerOptionsSetup before KestrelServerOptions ( #755 ) ( #757 )
...
- Required to ensure that options.ApplicationServices is available after during UseKestrel(options)
2016-04-18 16:57:59 -07:00
Mike Harder
bbf2c83a7d
Add KestrelServerOptionsSetup to IServiceCollection in UseKestrel() ( #755 )
...
- Previously, KestrelServerOptionsSetup was only added to IServiceCollection in UseKestrel(options)
- Required to ensure that options.ApplicationServices is available after calling UseKestrel()
2016-04-18 15:32:09 -07:00
Chris R
c48353f4ef
Hosting#698 Remove IServerFactory
2016-04-15 16:05:01 -07:00
Pavel Krymets
f61af9a746
Migrate tests, tools and samples to portable
2016-04-14 15:47:59 -07:00
Mike Harder
6047a62c07
Add IWebHostBuilder.UseKestrel(options) overload to configure Kestrel ( #720 )
...
- Replace KestrelServerInformation with KestrelServerOptions.
- Move properties from KestrelServerPoolingParameters to KestrelServerOptions.
- Stop reading default options from "kestrel.*" config settings.
- Move extension method IApplicatonBuilder.UseKestrelConnectionLogging() to KestrelServerOptions.UseConnectionLogging()
2016-04-13 14:57:54 -07:00
Stephen Halter
7d4fcfeb23
Depend on separate libuv package
2016-04-10 21:15:43 -07:00
BrennanConroy
109c56713a
React to logging changes
2016-04-01 11:53:47 -07:00
Stephen Halter
c567e4814a
Clean up Travis builds
...
- No longer build libuv in .travis.yml
- The Ubuntu libuv build should now be taken from http://github.com/aspnet/libuv-build
- Remove unneeded packages from .travis.yml
- Stop skipping mono tests
2016-03-31 12:25:01 -07:00
Doug Bunting
c828fafe1b
React to HttpAbstractions namespace changes
...
- aspnet/HttpAbstractions#549 and aspnet/HttpAbstractions#592
- clean up `using`s
2016-03-30 16:04:43 -07:00
Mike Harder
088b7e5779
Add UseKestrel() extension method to IWebHostBuilder ( #713 )
2016-03-30 12:08:32 -07:00
Stephen Halter
f0e438f65f
Remove IKestrelTrace.ApplicationError overload without connection id
...
Add test verifying that exceptions thrown from application tcs continuations
run by the LoggingThreadPool don't get logged as general exceptions.
2016-03-30 11:13:13 -07:00
Cesar Blum Silveira
4b214115ca
Proper skip reasons for HttpsConnectionFilter tests ( #677 ).
2016-03-22 18:00:15 -07:00
Stephen Halter
850632a091
Ensure KestrelThreads get stopped in tests if there is a startup failure
2016-03-17 07:44:30 -07:00
Stephen Halter
b55bef20aa
Allow the server to forcefully close socket it tests with connection failures
...
- This is a delayed reaction to 54caf30 which causes connections closed from
the server to be closed less gracefully due to no longer waiting for a FIN
from the client
2016-03-17 07:44:28 -07:00
Cesar Blum Silveira
37b0917ac1
Use TLS 1.1 or 1.2 only ( #637 ).
2016-03-09 12:09:31 -08:00
Stephen Halter
f15471bcf2
Remove 2 from MemoryPool2 and related types
...
- This was merely an artifact from when this was the second of 2 pools
2016-03-03 12:11:25 -08:00
Doug Bunting
bb2e76c7f1
Remove project name from output path
...
- aspnet/Coherence-Signed#187
- remove `<RootNamespace>` settings but maintain other unique aspects e.g. `<DnxInvisibleContent ... />`
- in a few cases, standardize on VS version `14.0` and not something more specific
2016-03-02 18:57:23 -08:00
Cesar Blum Silveira
41f77ee3fd
Handle uploads larger than 2GB.
2016-03-02 16:09:52 -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
766803c573
Return 400 for bad requests and close conn
2016-02-27 12:35:12 +00:00
Ben Adams
48d3c63f70
TestHelper classes for shared types
2016-02-26 23:48:52 +00:00
Ben Adams
4bfcd7ba1f
Drain chunked extensions + refactor
2016-02-26 23:48:51 +00:00
Ben Adams
331d4a87ac
Move chunked request tests
2016-02-26 23:48:51 +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
Stephen Halter
4bcc44faed
Merge branch 'benaadams/build-issues' into dev
2016-02-26 12:18:15 -08:00
Ben Adams
e579745f93
System.Net.Http references
2016-02-26 12:17:59 -08:00
Doug Bunting
37055517ee
Correct test attributes
...
- #654
- `[IPv6SupportedCondition]` requires `[ConditionalFact]` or `[ConditionalTheory]`
2016-02-24 22:35:20 -08:00
BrennanConroy
f6d0443692
Add build references to tests because they don't flow up to parent anymore. See: https://github.com/NuGet/Home/issues/2153
2016-02-22 16:01:24 -08:00
John Luo
99ccae64eb
Updating test TFMs for custom test discovery
2016-02-18 16:50:53 -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
04736e1d09
Remove FrameworkSkipConditions for Mono
...
- Maybe things are better now with graceful shutdown *crosses fingers*
2016-02-17 16:05:37 -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
Ben Adams
ffa8f3f092
Helper function for test socket creation
2016-02-17 03:59:59 +00: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
f8aa1a676a
Pass ServerInformation as property of ServiceContext
2016-02-13 05:51:54 +00:00
Ben Adams
c293bbbd1a
Reuse headers to prevent values moving to higher GC gens
2016-02-13 01:16:17 +00:00
Kiran Challa
dfcd6a6227
Enable tests to run using dotnet xunit runner
2016-02-09 23:48:09 -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
Stephen Halter
d616f0ccb0
Fix FindFirstEqualByte tests
...
- On some platforms, the bytes array was not large enough to fill a vector.
Ex: https://travis-ci.org/aspnet/KestrelHttpServer/builds/105277870#L2633
- Additionally test FindFirstEqualByte with only one bit set in the array
2016-01-27 14:32:34 -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
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
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
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
Brennan
63cd6149d1
Removed IsLocal from ConnectionInfo
2016-01-19 08:37:47 -08:00
John Luo
9885377148
Reacting to hosting rename
2016-01-17 16:34:17 -08: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
ab5ef547e1
Make chunked writes atomic
2016-01-11 16:53:46 -08:00
Thom Kiesewetter
1b09a76ebb
Find First Byte Fast
2016-01-11 08:31:52 +01:00
Cesar Blum Silveira
2ce28d8f13
Verify OnComplete is called when OnStarting isn't ( #470 ).
2016-01-08 11:50:59 -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
John Luo
b826491234
Reacting to new hosting API
2016-01-07 11:54:27 -08:00
Stephen Halter
ffd950966e
Merge branch 'benaadams/string-construct' into dev
2016-01-06 12:14:15 -08: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
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
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
4e9f8366cf
Move stream reuse test to EngineTests
2015-12-28 22:36:28 +00:00
Ben Adams
11b360b667
Faster MessageBody.For
2015-12-26 07:11:54 +00:00
John Luo
9edd6f60b9
Missed update after rebasing
2015-12-18 14:48:13 -08:00
John Luo
bd10d507f8
Reacting to new Hosting API
2015-12-17 15:08:17 -08:00
Ben Adams
186f6d0a05
Horizontal initialize repeat vectors once
2015-12-17 10:18:20 +00:00
Stephen Halter
5d6fdc5eb5
Merge branch 'benaadams/vector.dot' into dev
2015-12-16 17:39:40 -08:00
Ben Adams
9fa9c45eda
ReuseStreams config and tests
2015-12-16 21:27:07 +00:00
Ben Adams
f5e45accac
Amortize Stream Costs
2015-12-16 20:51:44 +00:00
Cesar Blum Silveira
349af50977
Pre-allocate standard method and version strings.
2015-12-16 10:47:59 -08:00
Ben Adams
4460cd3470
Don't use Vector<byte>.Dot
2015-12-16 16:24:45 +00:00
Stephen Halter
3e42904096
Pool UvWriteReqs instead of SocketOutput.WriteContexts
...
- This allows all connections accepted by the same thread to share a pool
2015-12-10 20:31:30 +00:00
Stephen Halter
f42bb02f24
Merge branch 'benaadams/server-crash' into dev
2015-12-10 12:18:13 -08:00
Ben Adams
9e8b07ecf8
Error concurrent reads gracefully
2015-12-10 16:25:06 +00:00
John Luo
fd33475c05
Ignore null valued headers #429
2015-12-09 17:23:34 -08:00
Stephen Halter
3e2c090d7c
Skip more tests on Mono to prevent hangs
...
- It seems like I missed some FrameworkSkipConditions when I merged these tests
2015-12-09 16:06:00 -08:00
Kristian Hellang
4cc070fe28
Added some KestrelServer tests
2015-12-10 00:00:38 +01:00
Kristian Hellang
6fbc3b8832
Added null check in KestrelServerInformation
2015-12-08 10:58:42 +01:00
Stephen Halter
90ece575f7
Merge branch 'khellang/configurable-thread-count' into dev
2015-12-08 00:13:56 -08:00
Stephen Halter
d0dca75241
Remove count parameter from ISocketOutput.ProducingComplete
...
- This makes the calling code cleaner with a (hopefully) minimal pref impact
2015-12-08 00:09:24 -08:00
Kristian Hellang
8d6a999bc3
Made NoDelay configurable
2015-12-07 22:09:04 +01:00
Kristian Hellang
12ee74c09c
server.threadCount -> kestre.threadCount
2015-12-07 22:00:03 +01:00
Kristian Hellang
bfad32f223
Added test for Addresses
2015-12-07 15:38:08 +01:00
Kristian Hellang
50f95cbbc0
Added some tests for ThreadCount
2015-12-07 15:38:07 +01:00
Ben Adams
b1e8f0cdea
Add IThreadPool interface
2015-12-03 10:37:52 +00:00
Ben Adams
5ae9b3c383
Log user code threadpool continuation execptions
2015-12-03 09:56:21 +00:00
Stephen Halter
7cbbf68e9d
Merge branch 'benaadams/connectionfilter' into dev
2015-12-02 19:21:05 -08:00
Ben Adams
a85f37697c
Add SSL+Upgrade regression test
2015-12-03 02:10:37 +00:00
John Luo
168f4770f4
Reacting to new IServer and IHttpApplication design
2015-12-01 13:03:46 -08:00
Cesar Blum Silveira
921c338a40
Support PathBase ( #214 ).
2015-11-30 16:42:02 -08:00
Ben Adams
2937fc3c98
OnConnection->OnConnectionAsync
...
Resolves #433
2015-11-29 03:57:47 +00:00
Stephen Halter
07c0b414f0
Merge branch 'benaadams/faster-headers' into dev
2015-11-23 15:10:24 -08:00
Cesar Blum Silveira
e4fd91bb68
Fix hang on Connection: close requests. ( #406 )
2015-11-20 20:43:52 -08:00
Ben Adams
feb40402de
merge preamble-output, socket-output
2015-11-21 04:18:06 +00:00
Ben Adams
a3173c487a
Precomputed header bytes
2015-11-21 00:22:44 +00: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
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
592d802fde
Add test for https scheme, code cleanup
2015-11-18 05:06:30 +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
b8f01cf674
Merge pull request #378 from benaadams/thread-count
...
Network thread count defaults
2015-11-17 07:34:29 -08: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
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
Cesar Blum Silveira
a3a49d21b8
Reset Frame.Scheme on each request ( #366 ).
2015-11-13 16:05:10 -08:00
Ben Adams
d493667851
Enable multi loop+thread tests
...
Resolves #232
2015-11-13 20:00:32 +00:00
Cesar Blum Silveira
2ac5e4c790
Remove unneeded dependency System.Net.NameResolution.
2015-11-13 11:31:25 -08:00
Cesar Blum Silveira
dd1ffa5f84
Skip some tests on Mono to prevent CI hangs.
2015-11-13 11:07:21 -08:00
Stephen Halter
59cdd60af6
Don't pre-complete too many writes
2015-11-12 17:08:43 -08:00
Stephen Halter
8ad7b7125a
Merge branch 'benaadams/slower-ci-date' into dev
2015-11-12 16:33:25 -08:00
Stephen Halter
0ead24680d
Merge branch 'benaadams/reduce-log-boxing' into dev
2015-11-12 16:01:06 -08:00
N. Taylor Mullen
86e1924cad
Remove System beta tag in project.json for coreclr packages.
2015-11-12 12:23:45 -08:00
Ben Adams
ade0dbadb3
Slow date wait for CI
...
Resolves #339
2015-11-11 13:06:15 +00:00
Stephen Halter
55f6f21d5a
Build Microsoft.AspNet.Server.Kestrel.Https for dotnet5.4
2015-11-10 17:15:35 -08: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
c0f82765aa
Move logging to new style
2015-11-10 10:43:51 +00:00
Pawel Kadluczka
0bfc97e46f
Fixing test so that it runs on CoreClr
2015-11-10 01:44:42 +00:00
Cesar Blum Silveira
889a24278d
Merge branch 'release' into dev
2015-11-02 17:36:41 -08:00
Cesar Blum Silveira
eaee76dfeb
Strong name everything.
2015-11-02 16:16:55 -08:00
John Luo
facf3ad0da
Missed update for test when reacting to hosting changes
2015-10-30 16:18:50 -07:00
John Luo
b466c3b7d7
Reacting to Hosting changes
2015-10-30 14:19:55 -07:00
Pavel Krymets
af2c32f612
React to xunit change. Fix build error
2015-10-30 10:52:59 -07:00
Stephen Halter
777f523135
Update System.Net.Sockets dependency in test project to 4.1.0
...
- This only affects the test project
- The Socket.*Async extension methods are available for net46 but not net451
so we ifdef.
2015-10-29 14:31:44 -07:00
Troy Dai
e9a6061023
Make Frame implements IHttpConnectionFeature
...
Provide RemoteIPAddress as well as RemotePort
2015-10-29 10:08:35 -07:00
moozzyk
c1b21b89d5
Removing dependency on Microsoft.Extensions.PlatformAbstractions
2015-10-27 01:40:28 -07: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
David Fowler
151b0f3a16
Fixed remaining namespace changes
2015-10-23 01:50:35 -07:00
Pavel Krymets
eb2c3a1ce8
Rename Microsoft.Runtime.Abstractions to Microsoft.Extensions.PlatformAbstractions
2015-10-22 18:22:05 -07:00
Stephen Halter
8d107b22ae
Socket.Disconnect throws a PlatformNotSupportedException on coreclr/linux
...
#266
2015-10-21 12:57:27 -07:00
Pavel Krymets
f8fd2f9ac9
React to hosting changes
2015-10-21 10:23:53 -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
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
611eaeb761
Add test for large blocks not taken from slab
2015-10-14 16:11:38 -07:00
David Fowler
6aaa3cbe06
Use IApplicationLifetime.StopApplication instead of
...
IApplicationShutdown.
React to hosting changes 374526b270
2015-10-14 01:09:11 -07:00
David Fowler
ef38f5589d
React to hosting changes to IApplicationLifetime
2015-10-14 00:46:18 -07:00
Kiran Challa
dcdf778bcc
Reacting to testing changes
2015-10-13 05:24:25 -07:00
Stephen Halter
a9de028ba3
Enable the LargeUpload functional test now that #234 is resolved
2015-10-09 15:58:14 -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
Louis DeJardin
dc0eb679ae
Updating unit tests for Frame IFeatureCollection update
2015-10-09 13:09:37 -07:00
Stephen Halter
0c1b05ce2d
Merge branch 'release' into dev
2015-10-08 16:40:13 -07:00
Stephen Halter
7aa85ae722
Unit test for the IsEnd fix in the previous commit
2015-10-08 16:37:17 -07:00
Stephen Halter
24c0a8e142
Fix MemoryPoolIterator2.CopyTo's block traversal
...
- This fix prevents large request streams from being corrupted
#234
2015-10-08 16:16:41 -07:00
Chris R
0b36382448
Merge pull request #236 from benaadams/sanitize-loops
...
Sanitize loops
2015-10-08 10:05:17 -07:00
Ben Adams
0a297688b4
Use Jit recongised, standard loop construct
...
For bounds check elimination.
Convey intent more clearly; eliminate bounds checks
2015-10-08 12:31:21 -04:00
Stephen Halter
cd1c80daa7
Fix EngineTests that weren't using the appropriate ServiceContext
...
- This meant that the affected tests weren't run with the NoOpConnectionFilter
2015-10-07 17:25:10 -07:00
Chris R
1f50f4c2a8
#231 bind to IPv6Any, add functional tests.
2015-10-05 16:13:11 -07:00
Stephen Halter
8fc8307ad2
Embed private key with the test X.509 certificate
...
- Use the PKCS #12 certificate format to enable this
2015-10-05 03:17:34 -07:00
Stephen Halter
0844369f5f
Add unit tests for ConectionFilters and HTTPS
...
- Run all the EngineTests with and without a ConnectionFilter
2015-10-05 03:16:36 -07: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
moozzyk
d2f282f54f
Consuming Libuv from NuGet package
...
Fixes #50
2015-09-26 18:00:50 -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
damianedwards
a7b65efa75
CR feedback
2015-09-25 14:59:47 -07:00
damianedwards
3c2408db68
Fix tests after rebase
2015-09-25 14:59:47 -07:00
damianedwards
7c46b2bd3b
Use a timer to generate the value for the Date header in responses:
...
- Doing it on each request is expensive
- The Timer is started when the first request comes in and fires every second
- Every request flips a bool so the Timer knows requests are coming in
- The Timer stops itself after a period of no requests coming in (10 seconds)
- #163
2015-09-25 14:59:47 -07:00
Louis DeJardin
b6c272cd5b
Removing console output from unit tests
2015-09-25 12:49:29 -07:00
Stephen Halter
dc902f5fc4
Update SocketOutput to not call QueueUserWorkItem unnecessarily
2015-09-25 12:49:28 -07:00
Louis DeJardin
325423de40
Sorting usings
2015-09-25 12:49:26 -07:00
Louis DeJardin
091084cfe2
Refactoring MemoryPool class locations
...
Moving Iterator out into its own file rather than being a nested class
Moving pool classes into Infrastructure namespace instead of Http
2015-09-25 12:49:23 -07:00
Louis DeJardin
d3a87c4c14
Removing MessageBodyExchanger base class
2015-09-25 12:49:17 -07:00
Louis DeJardin
7917569466
Changing chunked with exception test criteria
2015-09-25 12:49:16 -07:00
Louis DeJardin
52dc37eae7
Fixing a header parsing bug
...
When request header data arrives with \r\n split across packets
2015-09-25 12:49:16 -07:00
Louis DeJardin
e5a3bda3a2
Progress on flow control
...
* Dealing with race conditions
* Reworking iterator methods
* Shutdown and Close need to be passed throught the write-behind mechanism
2015-09-25 12:49:15 -07:00
Louis DeJardin
1f6aaebeda
Changing flow control for incoming data
...
SocketInput is now awaitable
Input buffers are slab-allocated and pinned from large object heap
Request frame parsing is offloaded from libuv thread
2015-09-25 12:49:14 -07:00
Louis DeJardin
557f6d6993
Refactoring response control flow
...
- Bring through both sync and async execution paths
- Remove callback pattern from from and socketoutput write calls
2015-09-25 12:47:51 -07:00
Stephen Halter
ca8161466e
Allow mock libuv to shutdown gracefully.
...
This speeds up SocketOutputTests and reduces the total test time on my
machine from 35 seconds to 25 seconds.
2015-09-24 17:20:39 -07:00
Brennan
b9f26311ef
Fix test dependency
2015-09-24 08:26:00 -07:00
Stephen Halter
0ef096b41c
Increment connection id for logging
2015-09-10 11:41:22 -07:00
Doug Bunting
fea510f1d0
React to `xunit.runner.aspnet` package updates
...
- aspnet/aspnet.xunit@5a12e89
2015-09-09 19:45:47 -07:00
Ivan Derevyanko
a93a66fe7c
Replace Trace.WriteLine with ITraceLogger
2015-09-09 00:26:26 +02:00
Ivan Derevyanko
ed4850a2b1
Style fix
2015-09-05 18:32:16 +02:00
Ivan Derevyanko
6d47227975
KestrelTrace refactored and added to the ServiceContext. Close aspnet/KestrelHttpServer#141
2015-09-05 18:17:17 +02:00
Stephen Halter
e1b472ddc4
Add ServerAddress tests
2015-08-31 10:46:50 -07:00
Chris R
803ec38073
React to string[] -> StringValues changes.
2015-08-28 12:59:00 -07:00
Stephen Halter
2642c84bf9
Don't automatically set Content-Length: 0 in some circumstances
...
- When in response to a HEAD Request
- For 101, 204, 205 and 304 responses
- For non keep-alive connections
2015-08-26 16:16:35 -07:00
Stephen Halter
69759231ff
Set Content-Length: 0 when an AppFunc completes without a write
...
- Previously an incomplete chunked response would be written instead.
- Add test to verify Content-Length: 0 is set automatically.
- Add test to verify HTTP/1.0 keep-alive isn't used if no Content-Length
is set for the response.
- Add tests to verify errors are handled properly after chunked writes.
#173
2015-08-25 23:17:41 -07:00
Stephen Halter
753d64660d
Ignore zero length writes when automatically chunking responses
...
- Zero length writes would previously be interpreted as the end of response
- Optimize writing the chunked response suffix
- Add tests for automatic response chunking
2015-08-14 15:59:47 -07:00
Stephen Halter
4f0480a4d0
Gracefully handle exceptions thrown from OnStarting callbacks
...
- If OnStarting is being called after the app func has completed, return a 500.
- If Onstarting is being called due to a call to write, throw from write.
2015-08-14 12:05:43 -07:00
Stephen Halter
b162202519
Properly close keep alive connections
2015-08-14 11:49:43 -07:00
Stephen Halter
b2226772e3
Expand timeout in SocketOutputTests due to flakiness on the CI server
...
#154
2015-08-07 12:27:04 -07:00
Troy Dai
b8f930bb4c
Update CoreCLR versions
2015-08-04 10:15:28 -07:00
Stephen Halter
e5144e3139
Include Server and Date in the initial response header dictionary
2015-08-03 16:20:34 -07:00
Stephen Halter
7446fe4cc7
Update SocketOutputTests to account for the "immediate" Write param
2015-08-03 16:20:30 -07:00
Louis DeJardin
963f086eb0
Prototypeing a fast header dictionary
...
Conflicts:
src/Microsoft.AspNet.Server.Kestrel/project.json
2015-08-03 16:20:14 -07:00
Stephen Halter
6da15a65b2
Additional testing using app funcs that throw exceptions
2015-07-30 16:02:39 -07:00
Stephen Halter
4a9515d2e0
Gracefully handle uncaught exceptions in user code when possible
2015-07-30 16:01:33 -07:00
Stephen Halter
b2289b9a54
Disable parallel test execution
...
- MultipleLoopTests and NetworkingTests seem to interfere with each other.
2015-07-30 15:20:22 -07:00
Troy Dai
07de3cafd1
Clean build warnings
2015-07-30 12:14:13 -07:00
Victor Hurdugaci
343d698286
React to DNX renames
2015-07-29 01:04:59 -07:00
Stephen Halter
cce9d8f09c
Make SocketOutput more testable
...
- Added a MockLibUv class
- Create a SocketOutputTests class
2015-07-28 16:57:22 -07:00
Louis DeJardin
10bce6a2ec
Constrain the timing on the dispatch test
2015-07-26 19:11:17 -07:00
Louis DeJardin
f935567cfd
Read callback status is always 0 for any error and EOF
2015-07-24 15:36:45 -07:00
Louis DeJardin
598250a1d8
Fixing pipe name in test
2015-07-24 15:23:01 -07:00
Louis DeJardin
42246fd51b
Using named pipes to dispatch connections to multiple threads
2015-07-24 13:50:13 -07:00
Louis DeJardin
ceeb4edabd
Adding UvPipeHandle
2015-07-24 13:50:10 -07:00
Stephen Halter
b9901c3bfe
Surface fatal exceptions that stop the event loop
...
- Request an app Shutdown so KestrelEngine gets disposed
- Ensure Listener.Dispose doesn't deadlock before the engine
can be disposed
- Rely on the existing logic to rethrow in the fatal error when
the engine gets disposed
2015-07-21 11:58:26 -07:00
Stephen Halter
0670b7ae61
Ensure all the C# files have copyright notices
2015-07-06 17:49:00 -07:00
Chris R
de72acc2ca
Update test Socket dependency
2015-06-05 15:28:19 -07:00
N. Taylor Mullen
063fb64c8b
Update LICENSE.txt and license header on files.
2015-05-01 13:53:45 -07:00
Doug Bunting
5ad7aea8b4
Update .xproj files for Microsoft.Web.AspNet.* -> Microsoft.DNX.* rename
2015-04-02 13:49:26 -07:00
Brennan
20ffd7e081
Update xunit.runner.kre => xunit.runner.aspnet.
2015-03-12 16:26:13 -07:00
N. Taylor Mullen
8d8c6ea823
Update .kproj => .xproj.
2015-03-11 14:09:00 -07:00
N. Taylor Mullen
f796e1a5fc
Remove BOM from project.json, *.cmd, *.sh and *.shade files.
2015-03-09 12:55:39 -07:00
N. Taylor Mullen
06a82669f5
Update aspnet50/aspnetcore50 => dnx451/dnxcore50.
2015-03-08 12:51:12 -07:00
Brennan
d08e5d3572
Updating tests to use official xunit
2014-12-17 10:46:08 -08:00
Victor Hurdugaci
4a2dd8f279
Add schema version to kproj files
2014-11-25 10:54:18 -08:00
Victor Hurdugaci
1b8f25f7d4
Update KProj to the latest format
2014-11-12 15:15:40 -08:00
Pranav K
ba0e3321bf
Reacting to CLR package versioning changes
2014-10-10 10:33:06 -07:00
David Fowler
72c32367a4
Fixup references and the sample
2014-10-05 11:26:15 -07:00
David Fowler
418f745292
Updated to use the new target framework in project.json
2014-09-04 01:52:19 -07:00
David Fowler
77d6318cfc
Updated to use the new target framework in project.json
2014-08-28 23:39:13 -07:00
Pranav K
226e6f3291
Reacting to System.IO package version change
2014-08-20 06:56:34 -07:00
David Fowler
26084c7f13
Removed source files from the project
2014-08-15 08:17:40 -07:00
David Fowler
33cd0d89aa
Renamed configurations to frameworks in project.json
2014-07-13 22:12:48 -07:00
Louis DeJardin
74a4c8cd27
Renaming KestralTests folder KestrelTests
2014-07-07 13:08:28 -07:00
Louis DeJardin
8624b82b2b
Improving callback exception support
...
Also renaming KestralTests to KestrelTests
2014-07-07 13:08:25 -07:00
Louis DeJardin
8d527e4e0b
Removing a reference to make things work better
2014-06-30 14:05:23 -07:00
David Fowler
e74c4bfa81
Disable flaky engine tests
2014-06-29 09:28:43 -07:00
Louis DeJardin
e4b9bd265c
Adjusting Kestrel to run cross platform
2014-06-27 20:01:44 -07:00
Louis DeJardin
9e4bc60205
Adding amd64 support
...
Moves Libuv.dll into nupkg
Uses ILibraryManager to locate location for native libraries
Updates version numbers to 1.0.0-*
Throws exceptions with error text provided by libuv.dll
Bind to ip4 or ip6 endpoints
Getting server defaults from ini
Enabling "Kestrel" to be used as a Main entrypoint
2014-06-20 21:09:44 -07:00
Louis DeJardin
17e566c5d1
Adding "server.urls" configuration support to kestrel
2014-06-17 22:45:53 -07:00
Louis DeJardin
6ac6419f4f
Adding support for 'k web --server kestrel'
2014-06-13 13:10:46 -07:00
Louis DeJardin
9c7cb6a958
Adding some tests for Http11
...
Requires updating to test utilities
Adding initial EventSource to try to see some order of events
2014-06-11 17:09:25 -07:00
Louis DeJardin
660babcd7f
Adding core clr configurations
2014-06-10 00:29:16 -07:00
David Fowler
ad738561af
Fixed project.json casing
2014-06-08 23:39:09 -07:00
David Fowler
75d0b29954
Renamed Project.json to Project.json2
2014-06-08 23:39:08 -07:00
Louis DeJardin
ebd6af0fd6
Trying to get 100 Continue working again
2014-06-08 01:03:56 -07:00
Louis DeJardin
044bbb83e6
Getting request body variations to work
2014-06-07 02:49:25 -07:00
Louis DeJardin
e517e39aac
Not working, but worth taking a snapshot of the source
2014-06-06 22:13:31 -07:00
Louis DeJardin
c9d6db14bc
Adding an engine, a thread manager, an accept loop
2014-06-03 16:41:55 -07:00
Louis DeJardin
2334fe6dc8
Marking the unit test project target framework explicitly
2014-06-02 17:29:38 -07:00
Louis DeJardin
1b412bc99f
Adding libuv p/invokes
2014-06-02 16:32:31 -07:00
Louis DeJardin
3404100f08
Adding empty projects and solution
2014-06-02 16:31:33 -07:00