Commit Graph

37 Commits

Author SHA1 Message Date
Liangying.Wei 201c058b93 Fix TestWebSocketConnectionFeature that CancellationToken is not working (#2906) 2018-09-05 09:31:05 -07:00
BrennanConroy f42f4c56e6
Initialize HttpConnectionManager before registering callbacks (#2878) 2018-08-30 14:42:16 -07:00
BrennanConroy f8a46faf9d
Detect ASP.NET SignalR server connection attempt (#2820) 2018-08-22 11:17:04 -07:00
David Fowler 5e7f63b096
Make un-graceful shutdown a bit more graceful (#2748)
* Make un-graceful shutdown a bit more graceful
- Change how graceful shutdown is done to ensure there are no errors on shutdown.
- Avoid closing pipes from under other components that own those pipes.
- Close the application output so that the application's read loop ends gracefully. For websockets, we cancel the token, for other transports, we close the output directly.
2018-08-07 21:39:09 -07:00
BrennanConroy 3d6e1e69fd
Close LongPolling connection on poll exception (#2701) 2018-07-31 09:52:10 -07:00
James Newton-King 96bbe70cd8
Handle incoming HTTP requests being canceled gracefully (#2314) 2018-05-19 13:32:05 +12:00
James Newton-King db33d593f0
Gracefully handle disposing while writing (#2180) 2018-05-09 17:57:56 -07:00
James Newton-King da7a95f563
Handle null collections when writing NegotiateResponse (#2202) 2018-05-04 16:08:06 -07:00
BrennanConroy 1c9607a1ed
Verify Verifiable spelling (#2114) 2018-04-22 21:33:57 -07:00
BrennanConroy e9937ffb66
Split lock into WriteLock and StateLock to prevent deadlocks and unneeded lock contention (#2081) 2018-04-18 17:44:05 -07:00
David Fowler 903fe1e902
Added support for negotiate response to redirect the client to another SignalR endpoint (#2070)
- Add a SkipNegotiation flag to the .NET and ts client
to allow skipping the negotiation phase. Don't infer it based on the transport type.
-  Updated the negotiate protocol to support returning a redirect url
- Added support to .NET client to handle redirect negotiations
- Handle poorly written endpoints that sends infinite redirects
- Added access token support and an infinite redirect guard
- Add delete handler for stopping the transport
2018-04-18 14:22:45 -07:00
David Fowler 05d6bbb782
Flush first long poll immediately (#2032)
There was a race condition between the first poll and any other http request that was sent. 
In particular, if you called StartAsync then StopAsync it was possible for the delete to happen before the poll started leading to 400 errors. This change fixes that by making the very first poll
return immediately so that the client can use that to determine if there was an error connecting.
2018-04-17 00:49:26 -07:00
Andrew Stanton-Nurse c05c5a6b2a
React to aspnet/KestrelHttpServer#2496: make IConnectionInherentKeepAliveFeature a boolean feature (#2041) 2018-04-16 11:34:12 -07:00
James Newton-King ddc905c219
Add VerifyNoErrorsScope (#1972) 2018-04-15 11:12:21 +12:00
Andrew Stanton-Nurse c7f7f36210
API Review for Http.Connections (#2010) 2018-04-13 16:35:07 -07:00
David Fowler 83dec1093a
Fixed flaky longpolling tests (#1993)
- Wait for disposal and removal of the connection
2018-04-13 00:42:31 -07:00
Andrew Stanton-Nurse 24328b8e88
fix #1281 by adding support for DELETE endpoint on server (#1925) 2018-04-12 12:39:08 -07:00
David Fowler 8b1a7e9199
API review feedback (#1974)
- Remove SetHttpContext
- Remove HttpContextFeature
- Add and implement IHttpTransportFeature on HttpConnectionContext
- Remove ConnectionMetadataNames
2018-04-12 03:50:14 -07:00
David Fowler 8cc851ff9b
Clean up timer code with custom awaitable (#1935)
- Gets rid of locks by using an event loop
2018-04-11 10:39:29 -07:00
James Newton-King b30c2fecbf
SSE formatting refactor (#1916) 2018-04-11 17:13:15 +12:00
James Newton-King 27d18578d0
Use expression body properties and implicit arrays where possible (#1906) 2018-04-08 21:40:01 +12:00
James Newton-King 0f663cadc4
readonly all the things (#1901) 2018-04-08 15:47:01 +12:00
David Fowler f632330d7f
Allocate pipe writer stream per connection (#1885)
- Don't create the PipeWriterStream per operation, make it per Connection
- Reduce the buffer size for CopyToAsync operations to 4K where possible instead of 81K (the default)
2018-04-06 14:36:35 -07:00
David Fowler e51676fb47 Policheck errors 2018-04-06 13:01:20 -07:00
David Fowler e3d90bdf6a
Fix graceful closing of pipes (#1882)
- Closing pipes gracefully in most cases. The only case where we forcefully close the pipes is during application shutdown
- Return 404 if sending to connection after disposal
- Added tests
2018-04-06 10:59:40 -07:00
James Newton-King 36edadabb4
Lock when sending data to connection (#1876) 2018-04-06 16:25:47 +12:00
James Newton-King cb5ece8a24
HttpTransportType refactor (#1873)
- Rename file to HttpTransportType.cs
- Add HttpTransportType.None
- Move All to static readonly field
- Make TransportType on client and service HttpConnectionOptions consistent
- Move setting defaults into ctor
2018-04-06 16:18:47 +12:00
BrennanConroy b0c4e9d0f7
0 byte read in WebSockets (#1878) 2018-04-05 18:50:30 -07:00
James Newton-King f7fc2647de
var all the things (#1855) 2018-04-05 18:41:13 +12:00
David Fowler 490fd088f9 Merge branch 'release/2.1' into dev 2018-04-04 15:02:47 -07:00
David Fowler 1c7ca7fa3a
Remove lazily initialization of the pipes (#1850)
- This fixes race condition
2018-04-04 14:43:34 -07:00
Mikael Mengistu ba0131a731
Rename TransportTypes to HttpTransportTypes (#1839) 2018-04-03 16:00:20 -07:00
James Newton-King 416b27c6d6
Fix build (#1825) 2018-04-03 11:45:05 +12:00
James Newton-King 3460d44848
Fix non-serializable tests (#1820) 2018-04-03 09:31:52 +12:00
David Fowler 0293e53e11
Handle uninitialized connections in disposal (#1786) (#1794)
- We made a change to not initialize pipes up front
on connection creation. That change make it null ref in disposal because we didn't check if the pipes were initialized.
- Added a test
- Also fixed the EchoConnectionHandler in the functional ts tests.
2018-03-30 15:51:48 -07:00
David Fowler eb7dc14c39
Handle uninitialized connections in disposal (#1786)
- We made a change to not initialize pipes up front
on connection creation. That change make it null ref in disposal because we didn't check if the pipes were initialized.
- Added a test
- Also fixed the EchoConnectionHandler in the functional ts tests.
2018-03-30 15:44:30 -07:00
Andrew Stanton-Nurse 6b3a27e73c
Bedrock Renames (#1777) 2018-03-30 15:09:19 -07:00