Age | Commit message (Collapse) | Author |
|
|
|
Opened some issues #28423 #28424. These tests are failing/hanging on my
dev box all the time.
|
|
* set SocketsHttpHandler to default
* address feedback
* fix if check for 28002
|
|
* Several perf improvements/tweaks for SocketsHttpHandler
- Chunked reads from buffer. We now process as much of the buffer as we can synchronously during ReadAsync, rather than returning once we hit the end of a chunk. For very small chunks that arrive quickly, this results in a huge perf increase, e.g. best case for the optimization, with lots of 1-byte chunks getting buffered together, it's now 10x faster. With 100-byte chunks buffered together, it's 2x faster.
- Blitting byte[] to output for known headers. Rather than using WriteStringAsync to output all header names, we now use WriteBytesAsync for known headers, with the headers precomputed into byte[]s and cached.
- Removed delegate/closure allocation from connection. We were accidentally closing over a cancellation token, resulting in an extra delegate and closure allocation in ConnectHelper. Also reduced the size of the EstablishSslConnectionAsync state machine by splitting the method in order to remove several arguments from being included.
- Use Utf8Formatter for hex values. Switched from custom formatting of hex values to just use Utf8Formatter.TryFormat.
- Avoid buffering in HttpConnection.CopyToAsync(Stream). This is used when we want to copy the whole source stream until EOF (e.g. for a Connection: close response), and thus we can skip the buffer and use the source stream's CopyToAsync directly.
- Added a test to exercise various size chunks, line endings, ReadAsync vs CopyToAsync, etc.
- Fix CopyToAsync cancellation handling. Even though we'll abort the connection when cancellation is requested, we still need to pass the token to the destination stream's WriteAsync to give it the opportunity to cancel. Also properly pass the buffer size through to the underlying stream's CopyToAsync where appropriate.
- Small miscellaneous cleanup, like removing a few unused arguments from methods, fixing an assert to validate the right thing, etc.
* Address PR feedback
* Fix test on netfx
|
|
* Improve test coverage of SocketsHttpHandler
Used code coverage information to write targeted tests to cover various uncovered paths in SocketsHttpHandler. Along the way fixed a variety of issues relating to throwing the wrong exception type, a stack overflow due to an unexpected recursive call, etc.
* Address PR feedback
* Re-disable a test
|
|
* Streamline SocketHttpHandler's ParseStatusLine validation
For a typical status line like "HTTP/1.1 200 OK", cuts the time of ParseStatusLine almost in half.
* Address PR feedback
|
|
|
|
|
|
|
|
|
|
- Renames ManagedHandler to SocketsHttpHandler
- Moves a bunch of files around accordingly
- Updates System.Net.WebSockets.Client to use SocketsHttpHandler directly
- Updates System.Net.Http's tests with a reflection-based rather than TLS-based method for instantiating an HttpClientHandler backed by a SocketsHttpHandler.
|
|
* enable all test data
* seperate test data
* add one missing data
* address pr feedabck
* address feedback
* disable test by active issue & add else clause
|
|
|
|
Fixes #26729
|
|
clean up request and response version handling in managed handler
|
|
The time of inner loop is dominated by the http protocol dribble tests.
Returning the Task.Delay to Task.Yield reduces it from ~19 seconds to less than a second on a Windows 10 RS3 box.
|
|
|
|
|
|
run (#26573)
* split test cases
* disable against CurlHandler as well
* address PR feedback
|
|
|
|
Several small ManagedHandler fixes
|
|
* split test data
* address pr feedback
* revert part of changes, and track disabled test data by new issue
* disable a Unix test case
|
|
|
|
|
|
|
|
|
|
|