Stephen Toub
f87da3dfe0
Wrap exceptions from ManagedHandler's server validation callback ( dotnet/corefx#24111 )
...
To match other handlers' behaviors.
Commit migrated from https://github.com/dotnet/corefx/commit/e0b912e37439118651ae12e5685b0ef7efd8f1fd
2017-09-18 11:12:48 -07:00
David Shulman
a10c42c864
Wrap cert callback leaked exceptions in WinHttpHandler ( dotnet/corefx#24107 )
...
Similar to the fix done for CurlHandler (dotnet/corefx#21938 ), fix WinHttpHandler so
that leaked exceptions from the user-provided certificate callback are
properly wrapped.
The ManagedHandler still needs to be fixed since it is not wrapping
properly.
Contributes to dotnet/corefx#21904
Commit migrated from https://github.com/dotnet/corefx/commit/ca5d83ec2855afa7ce4f60d9c5b0dd46e1cb2faf
2017-09-17 23:19:28 -04:00
Stephen Toub
29b6641eeb
Add ReadOnlyMemoryContent to System.Net.Http ( dotnet/corefx#24006 )
...
* Add ReadOnlyMemoryContent to System.Net.Http
Allows `{ReadOnly}Memory<byte>`s to be uploaded in HttpClient requests.
* Address PR feedback
* Address more PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/d183fd34074fba9633f025fe2251e7d7883c7f25
2017-09-13 13:01:15 -07:00
Lakshmi Priya Sekar
bf69088386
Merge pull request dotnet/corefx#23868 from Priya91/credentialmh
...
Remove duplicate bug ids in source code.
Commit migrated from https://github.com/dotnet/corefx/commit/82a45b73d9754ae5e82ce1c699b0c86db712e4fa
2017-09-12 18:55:50 -07:00
Lakshmi Priya Sekar
82a42d0e68
Move test to windows specific.
...
Commit migrated from https://github.com/dotnet/corefx/commit/b95d60789528d2d920e4d58238ee3fd3260585de
2017-09-12 17:36:53 -07:00
David Shulman
c8fcec1e55
Disable unreliable Http diagnostics logging test ( dotnet/corefx#23977 )
...
The Http test, SendAsync_ExpectedDiagnosticCancelledLogging, has been
failing at times.
I am going to disable this test until it can be made more robust. It is
not a reliable test because cancellation cannot be guaranteed to occur
with a certain time especially on a busy machine.
dotnet/corefx#23209
Commit migrated from https://github.com/dotnet/corefx/commit/839ace982010b10bef94c9aac1d2eb991f76c383
2017-09-12 13:09:51 -04:00
Lakshmi Priya Sekar
cfece7ec46
Move DefaultCredentialsTest to windows only.
...
Commit migrated from https://github.com/dotnet/corefx/commit/d961c15b20539f5638953e9506d35f49d038237a
2017-09-07 17:25:43 -07:00
Lakshmi Priya Sekar
6ea808c117
Remove duplicate bug ids in source code.
...
Commit migrated from https://github.com/dotnet/corefx/commit/22c66999a49f73002f8e6b04e54c10c7e5f2fe15
2017-09-07 15:20:41 -07:00
Lakshmi Priya Sekar
23c60bac8f
Merge pull request dotnet/corefx#23821 from Priya91/credentialmh
...
Use only CredentialCache for authentication when redirecting Uris in ManagedHandler.
Commit migrated from https://github.com/dotnet/corefx/commit/2b889c4a2d9877b7112d9a57061b92366d9c257a
2017-09-07 15:11:59 -07:00
Lakshmi Priya Sekar
7bf96b53d4
Consolidate code between different Http handlers.
...
Commit migrated from https://github.com/dotnet/corefx/commit/5ef59053709ef8b6f5b30b709bffbe38fcb19823
2017-09-07 11:18:43 -07:00
Stephen Toub
d37b1e463d
Respect UseProxy better in ManagedHandler ( dotnet/corefx#23750 )
...
To match CurlHandler, we should only be using environment variable-based proxy configuration if UseProxy is true, but we're currently using it regardless. This commit fixes that and adds a test for it.
Commit migrated from https://github.com/dotnet/corefx/commit/7615a2c1dde51e0797ed3ffbca70191af2aef79e
2017-09-07 00:11:34 -04:00
David Shulman
da2de2ec4a
Disable default proxy test on Desktop
...
HttpClient test ProxyExplicitlyProvided_DefaultCredentials_Ignored has
started failing on Desktop due to build system changes. Disabling for
now.
dotnet/corefx#23702
Commit migrated from https://github.com/dotnet/corefx/commit/2c50d92d6d07173db6ec5c8a6a17085613972a3b
2017-09-06 10:41:14 -07:00
Lakshmi Priya Sekar
ec142d891b
Use only CredentialCache when redirecting Uris in ManagedHandler.
...
Commit migrated from https://github.com/dotnet/corefx/commit/9d5f5d1f8630e3c50404647926496b0d45cf1203
2017-09-05 18:26:43 -07:00
Stephen Toub
45558100d1
Enable disabled HttpClientEKUTests on ManagedHandler ( dotnet/corefx#23754 )
...
They appear to all be passing now.
Commit migrated from https://github.com/dotnet/corefx/commit/2443b0d5f2a25f9c619aff9dca8ec2625eba1c96
2017-09-03 19:07:47 -04:00
David Shulman
c3dbc2406e
Disable some networking tests
...
Disabling tests.
dotnet/corefx#23765 dotnet/corefx#23766 dotnet/corefx#23767 dotnet/corefx#23768 dotnet/corefx#23769 dotnet/corefx#23770 dotnet/corefx#23771
Commit migrated from https://github.com/dotnet/corefx/commit/acafae51592f7e09fba003a3684d550dba155a2e
2017-09-02 16:50:54 -07:00
David Shulman
f571a92730
Merge pull request dotnet/corefx#23752 from davidsh/22735_1
...
Re-enable HTTP/2 test
Commit migrated from https://github.com/dotnet/corefx/commit/e35c540f90daa70604d54df72223ce11cb230cea
2017-09-02 16:33:45 -07:00
Justin Van Patten
a28887915b
System.Net.Http: Remove unnecessary null validator check ( dotnet/corefx#23675 )
...
A null validator is never passed-in when creating `ObjectCollection<T>`
instances internally, so we can avoid the unnecessary null checks.
Commit migrated from https://github.com/dotnet/corefx/commit/fa71a8d698df216b625391198b726e06b5232459
2017-09-01 16:57:17 -04:00
David Shulman
7df69b01b9
Re-enable HTTP/2 test
...
Turning back on the HTTP/2 test that relied on www.microsoft.com being
HTTP/2 now that the HTTP/2 server farm processing those requests is
working again.
Fixes dotnet/corefx#22735
Commit migrated from https://github.com/dotnet/corefx/commit/169daaad2062ab623fdafa738c3fdbc778d3652e
2017-09-01 12:33:26 -07:00
Eric StJohn
93a519b14b
Merge pull request dotnet/corefx#23611 from ericstj/removeNetFxSupportLibs
...
Remove NetFx support libs
Commit migrated from https://github.com/dotnet/corefx/commit/70201d1f97465882eda716c66da09d22c3933edc
2017-08-30 11:24:25 -07:00
Brian Chavez
88875187b0
XML doc spelling corrections - D through H. 🚿 ( dotnet/corefx#23638 )
...
Commit migrated from https://github.com/dotnet/corefx/commit/a27929935d2782cdc3e7be21653e8c4530274c6f
2017-08-29 17:10:01 -07:00
Brian Chavez
f866987b74
XML doc spelling corrections - I through P. 🚿 ( dotnet/corefx#23651 )
...
Commit migrated from https://github.com/dotnet/corefx/commit/b09fab5799bb1ca4bea4b4bb086d2c9870dd5191
2017-08-29 15:42:23 -07:00
Eric St. John
b2dae07f2b
Update VS configurations
...
Commit migrated from https://github.com/dotnet/corefx/commit/238bf3302817a910fac3968f4ac826424294ab0c
2017-08-29 08:49:24 -07:00
Eric St. John
20a117e4cc
Remove NetFx support libs
...
Now that we've shipped the NETStandard support package we will no longer build its content
from `master`.
It will be serviced from the `release/2.0.0` branch and the only netfx builds in `master` will
correspond to package content.
Commit migrated from https://github.com/dotnet/corefx/commit/eade3b36725c8d463a40589ff749af5bb0cab8f4
2017-08-29 08:46:22 -07:00
Brian Chavez
ba2326f831
XML doc spelling corrections - A through C. ( dotnet/corefx#23634 )
...
Commit migrated from https://github.com/dotnet/corefx/commit/afcbd9a5b9e4ecde2db3a69afd093631f1db91c5
2017-08-28 23:42:20 -07:00
Joseph Tremoulet
080969b562
Undo a few JIT layout workarounds ( dotnet/corefx#23510 )
...
Remove some `goto`s that were added to work around dotnet/coreclrdotnet/corefx#9692
(poor code layout for loop exit paths) -- the JIT's layout decisions
were improved in dotnet/coreclrdotnet/corefx#13314, and these particular `goto`s are
no longer needed; the same machine code is generated with or without
this change.
Some `goto`s previously tagged as workarounds for dotnet/coreclrdotnet/corefx#9692 are
still relevant for keeping codesize down pending dotnet/coreclrdotnet/corefx#13549;
update their comments accordingly.
Part of dotnet/corefx#23395 .
Commit migrated from https://github.com/dotnet/corefx/commit/d90ebb8bcfc24827c7eb478c178d8f98a8b98dd3
2017-08-23 20:35:58 -07:00
Stephen Toub
262530fb1d
Override Read/Write(span) on System.Net.Http streams ( dotnet/corefx#23345 )
...
Commit migrated from https://github.com/dotnet/corefx/commit/c351ba1f094871e4ae97f23f20f26648662cc4e6
2017-08-18 09:06:05 -04:00
Stephen Daudell
3ad7c43d5a
ManagedHandler: Only run connection pool cleanup timer when needed ( dotnet/corefx#23174 )
...
* Only run the cleanup timer if we have pools to cleanup.
* Addressed race condition and performance concerns.
* Addressed review feedback.
* Remove redundant initialization.
Commit migrated from https://github.com/dotnet/corefx/commit/6e0f8dcfe62aa587c4b52087861c0d789a5b9124
2017-08-16 16:50:41 -04:00
Stephen Toub
0cc0231751
Avoid manually pinning spans in crypto interop ( dotnet/corefx#23259 )
...
My recent PRs to add span-based overloads to crypto types employed a pattern where span-based interop signatures pinned the spans manually and then passed pointers to the actual P/Invoke declaration accepting a `byte*`. We can instead let the runtime handle the pinning by declaring the P/Invokes in terms of `ref byte`. In addition to reducing the code involved, there's also the tiny benefit in several cases of the data being pinned for less time.
Commit migrated from https://github.com/dotnet/corefx/commit/36afe5506def3fb49c84945faf0732ec0ec45b16
2017-08-16 09:18:41 -04:00
Geoff Kizer
7b2f25856c
address PR feedback and fix issue in ReadCrLfAsync
...
Commit migrated from https://github.com/dotnet/corefx/commit/88c3ab50da4518f1f89506934039f24be4284b02
2017-08-15 14:00:49 -07:00
Geoff Kizer
3d177b6d67
make FillAsync throw on EOF
...
Commit migrated from https://github.com/dotnet/corefx/commit/01b543ef084ee4ec5c61570d8090a3097a5c203f
2017-08-15 13:21:26 -07:00
Geoff Kizer
47fedb0ad6
Merge pull request dotnet/corefx#23186 from geoffkizer/headerdescriptor2
...
HttpClient: several HeaderDescriptor-related improvements
Commit migrated from https://github.com/dotnet/corefx/commit/c54cf8989aebe539ac9c7929fea14c4a0b62c721
2017-08-14 16:02:37 -07:00
Geoff Kizer
7c48a9bb07
address PR feedback
...
Commit migrated from https://github.com/dotnet/corefx/commit/b29703658f43e9b01638aa4cdf0176f48c5c0fc3
2017-08-14 15:26:08 -07:00
Geoff Kizer
1f2121892b
fix netfx build
...
Commit migrated from https://github.com/dotnet/corefx/commit/0589dfd640c1c2e40ea878efae44a74494222522
2017-08-14 13:42:23 -07:00
Geoff Kizer
7322dc6125
fix netfx build
...
Commit migrated from https://github.com/dotnet/corefx/commit/3ddc7bf88acdc432db2a3265bb98bcca4f1e484e
2017-08-14 12:11:17 -07:00
Stephen Toub
d7e1498910
Fix ManagedHandler redirect post->get behavior ( dotnet/corefx#23216 )
...
Commit migrated from https://github.com/dotnet/corefx/commit/2f4faed916caa8d70a72ad7518705aeac7c68257
2017-08-14 13:12:48 -04:00
Tarek Mahmoud Sayed
78e14f5cea
Modify High Sierra Check and Fix TZ Test ( dotnet/corefx#23171 )
...
Commit migrated from https://github.com/dotnet/corefx/commit/bdb3ef6ec7a7106c439796a27ec448e0e406310c
2017-08-14 08:46:56 -07:00
Stephen Toub
e2218fc078
Add Expect: 100-continue support to ManagedHandler ( dotnet/corefx#23196 )
...
Commit migrated from https://github.com/dotnet/corefx/commit/791f81d2d8eb45e5077d2c0c17e784ad597c5e3a
2017-08-14 08:42:01 -04:00
Stephen Toub
945d60b1f5
Enable full duplex communication with ManagedHandler ( dotnet/corefx#23180 )
...
* Enable full duplex communication with ManagedHandler
ManagedHandler currently waits for all of the request content to be sent before it processes any response content. While that matches with what many servers do (not sending any response content until all request content has been received), some sites and situations do benefit from or even require full duplex communication, such that the response can be processed even while the request content is being sent. This change is also a necessary step towards enabling Expect: 100-continue, as we need to be able to receive the response header before having sent the content, and even without Expect: 100-continue, this allows us to stop sending a large request body if a server quickly sends back a status indicating the transfer isn't needed (e.g. a redirect).
This change also improves on the cancellation support for sending the request body. The send cancellation token is now embedded in the request content stream and uses that token for all operations.
* Address PR feedback
- Don't force flush the headers before sending content.
- Skip the write buffer when using ContentLengthWriteStream
- Fix some typos
Commit migrated from https://github.com/dotnet/corefx/commit/a326d79a4fac6e82839ab1d672a2e536b6c81754
2017-08-13 06:07:13 -04:00
Geoff Kizer
32beab592f
several HeaderDescriptor-related improvements
...
Commit migrated from https://github.com/dotnet/corefx/commit/3d04b0f3cd6bd94d4677babcc9404bf1937d6b63
2017-08-12 23:24:50 -07:00
Geoff Kizer
64b0d71cc3
Merge pull request dotnet/corefx#23091 from geoffkizer/httpheaderdescriptor
...
add HeaderDescriptor and use as key for header store
Commit migrated from https://github.com/dotnet/corefx/commit/3e72ee5971db5d0bd46606fa672969adde29e307
2017-08-12 21:17:41 -07:00
Geoff Kizer
77f5a27b11
more PR feedback
...
Commit migrated from https://github.com/dotnet/corefx/commit/cf3f5468d547f609e4e54731664c7a12e4ed23ed
2017-08-12 19:19:02 -07:00
Stephen Daudell
e93ad01f42
ManagedHandler: Moved exception strings to .resx resources. ( dotnet/corefx#23173 )
...
* Moved exception strings to .resx resources.
* Addressed PR feedback.
Commit migrated from https://github.com/dotnet/corefx/commit/2efb83a3170ec14cafe6a14ea37edb037eb99836
2017-08-12 14:07:46 -04:00
Geoff Kizer
8aeb4c0aa9
better fix for ToUpper thing
...
Commit migrated from https://github.com/dotnet/corefx/commit/e241e262a8bfbd0b85b1364b678e79366e4a5f51
2017-08-11 17:01:53 -07:00
Geoff Kizer
e519368a1a
avoid ToUpperInvariant since we are just dealing with ascii
...
Commit migrated from https://github.com/dotnet/corefx/commit/09b012d075f79f04c44a6bcab3b5477f2e363144
2017-08-11 16:18:22 -07:00
Geoff Kizer
7d5f513074
defer token check in HeaderDescriptor.TryGet to after the known header lookup
...
Commit migrated from https://github.com/dotnet/corefx/commit/1a04a49325bd8450758896d0a7aa3add751a514f
2017-08-11 15:47:37 -07:00
Stephen Toub
50805a924a
Update TODOs with issue numbers
...
Commit migrated from https://github.com/dotnet/corefx/commit/924d34b8a04eb1bc0f005848d784d7d414d0d4d3
2017-08-11 15:34:57 -04:00
Stephen Toub
8bfc1f89b1
Fix potential deadlocks in HttpClient tests
...
A bunch of tests have the following structure:
```C#
var clientTask = hc.GetAsync(...);
await server.HandleRequest();
Handle(await clientTask);
```
If the HttpClient request fails in a way that causes the server not to receive the request, the test will hang, as the await for the server operation to complete will never complete.
This commit changes a bunch of the tests to avoid that pattern. This makes several of the tests disabled due to hanging actually reveal the cause of the problem, e.g. the ManagedHandler not supporting 1.0 requests and failing immediately if provided with that version without making a request to the server.
Commit migrated from https://github.com/dotnet/corefx/commit/e34b6fd99085c69c8fd7a64ed5eb4da5b66f4136
2017-08-11 15:34:06 -04:00
Stephen Toub
5682f2d1f3
Add some more tracing to ManagedHandler
...
Commit migrated from https://github.com/dotnet/corefx/commit/4b701ae87934156c42923cc1c379171a7a478a2d
2017-08-11 15:34:05 -04:00
Stephen Toub
48a1b245f6
Handle invalid chunk size in ManagedHandler ( dotnet/corefx#23160 )
...
To match WinHttpHandler, support chunk sizes up to ulong.MaxValue in size, and throw exceptions for anything larger.
Commit migrated from https://github.com/dotnet/corefx/commit/c8768231c3a272dd6f330dd1cccb9fa69e671915
2017-08-11 15:33:31 -04:00
Stephen Toub
ba64391f25
Remove CancellationToken field from StreamContent ( dotnet/corefx#23162 )
...
This is a holdover from a previous design, isn't used, but is still taking up space in the StreamContent. Remove it.
Commit migrated from https://github.com/dotnet/corefx/commit/fe2f34a967270a52bdec65cb09088b28240ea349
2017-08-11 13:58:43 -04:00