Cesar Blum Silveira
f8813a600d
Handle response content length mismatches ( #175 ).
2016-10-11 13:25:22 -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
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
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
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
20c1bb567d
Move TestConnection to the Microsoft.AspNetCore.Testing namespace.
2016-08-02 12:47:06 -07:00
Cesar Blum Silveira
138f23b246
Remove TestServer dependency from TestConnection.
2016-08-02 12:26:17 -07:00
moozzyk
69bd0dc4be
Reject requests that have null characters in path
2016-06-06 09:59:42 -07:00
Andrew Stanton-Nurse
09f5be1434
fix #909 by moving most classes to Internal ns
2016-06-03 14:14:21 -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
Kristian Hellang
72cc0ffbd5
Set Date and Server headers at response start
...
Closes #223
2016-05-26 17:38:16 +02: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
925d8e0200
Always cache headers and streams across frames ( #754 ).
2016-05-20 16:16:19 -07:00
Cesar Blum Silveira
86567e1d93
Fix engine test.
2016-05-19 14:06:27 -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
3186e1bd72
Make TakeStartLine more robust ( #683 ).
2016-05-12 12:07:08 -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
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
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
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
Ben Adams
48d3c63f70
TestHelper classes for shared types
2016-02-26 23:48:52 +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
aa48ad2933
Merge branch 'benaadams/loopback-fastpath' into dev
2016-02-18 10:52:42 -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
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
Cesar Blum Silveira
6757a31fd2
Build with dotnet ( #571 ).
2016-02-01 14:37:47 -08:00
Cesar Blum Silveira
1209eca3fa
Normalize request path to NFC and resolve dot segments ( #273 ).
2016-01-28 15:29:29 -08:00
Brennan
15ed03eb26
React to Logging API changes
2016-01-27 14:25:52 -08:00
Stephen Halter
a2fe59fb2c
Speed up unit tests
...
- Remove unnecessary uses of Task.Delay
- Change all usages to CancellationToken.None to default(CancellationToken)
for consistency
2016-01-27 13:01:44 -08:00
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
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