Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <mabaul@microsoft.com>2019-07-02 02:27:42 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2019-07-02 02:27:42 +0300
commit3508cd80261864c09bfebfa42a31e224598335eb (patch)
treee22e4a1047862358c5ac8d3dd7729e53ed3c783e /mcs/class/System.Net.Http
parent51a11b68c52034f0c6beef9f62dfa1c9d33761f0 (diff)
[System.Net.Http]: Delete broken `Send_Transfer_Encoding_Custom()` test. (#15470)
This test was checking a broken Mono-specific behavior, which has been removed after we switched to the new corefx-based handler. It also does not make much sense to use a `Transfer-Encoding` header with a GET request.
Diffstat (limited to 'mcs/class/System.Net.Http')
-rw-r--r--mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs36
1 files changed, 0 insertions, 36 deletions
diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs
index 7c558989cb1..7163231796c 100644
--- a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs
+++ b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs
@@ -803,42 +803,6 @@ namespace MonoTests.System.Net.Http
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
- // The SocketsHttpHandler permits custom transfer encodings.
- public void Send_Transfer_Encoding_Custom ()
- {
- if (HttpClientTestHelpers.UsingSocketsHandler)
- Assert.Ignore ("Requires LegacyHttpClient");
-
- bool? failed = null;
-
- var listener = NetworkHelpers.CreateAndStartHttpListener("http://*:", out int port, "/Send_Transfer_Encoding_Custom/");
- AddListenerContext (listener, l => {
- failed = true;
- });
-
- try {
- var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
- client.DefaultRequestHeaders.TransferEncoding.Add (new TransferCodingHeaderValue ("chunked2"));
-
- var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/Send_Transfer_Encoding_Custom/");
-
- try {
- client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Wait ();
- Assert.Fail ("#1");
- } catch (AggregateException e) {
- Assert.AreEqual (typeof (InvalidOperationException), e.InnerException.GetType (), "#2");
- }
- Assert.IsNull (failed, "#102");
- } finally {
- listener.Abort ();
- listener.Close ();
- }
- }
-
- [Test]
-#if FEATURE_NO_BSD_SOCKETS
- [ExpectedException (typeof (PlatformNotSupportedException))]
-#endif
public void Send_Complete_Content ()
{
var listener = NetworkHelpers.CreateAndStartHttpListener("http://*:", out int port, "/Send_Complete_Content/");