Commit Graph

346 Commits

Author SHA1 Message Date
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