You've already forked linux-packaging-mono
Imported Upstream version 6.8.0.95
Former-commit-id: f9d71b03d311b37638cba87ec50db50e194b00ba
This commit is contained in:
parent
0721831ed1
commit
6ab90dd8aa
@ -1 +1 @@
|
|||||||
df7ae798f41d86d2f488e6f7a71e6337bde019c5
|
cbbc8cbbdd0d8f33f327e39d59e267d63ec43436
|
@ -1 +1 @@
|
|||||||
84e3f78cba33f680a96d14b2e7193e98c007a699
|
18c90a85a208f0899ccd35e437481a76934ca350
|
@ -193,6 +193,19 @@ namespace System.Net.Http
|
|||||||
_readAheadTask = new ValueTask<int>(0);
|
_readAheadTask = new ValueTask<int>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if MONO
|
||||||
|
if (!_readAheadTask.Value.IsCompleted && _socket != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return _socket.Poll(0, SelectMode.SelectRead);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return _readAheadTask.Value.IsCompleted; // equivalent to polling
|
return _readAheadTask.Value.IsCompleted; // equivalent to polling
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,65 @@
|
|||||||
|
// Licensed to the .NET Foundation under one or more agreements.
|
||||||
|
// The .NET Foundation licenses this file to you under the MIT license.
|
||||||
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Net.Sockets;
|
||||||
|
using System.Net.Test.Common;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
#if !MONO
|
||||||
|
using Microsoft.DotNet.XUnitExtensions;
|
||||||
|
using Microsoft.DotNet.RemoteExecutor;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using Xunit;
|
||||||
|
using Xunit.Abstractions;
|
||||||
|
|
||||||
|
namespace System.Net.Http.Functional.Tests
|
||||||
|
{
|
||||||
|
using Configuration = System.Net.Test.Common.Configuration;
|
||||||
|
|
||||||
|
public class HttpClientHandler_ConnectionReuse_Test : HttpClientTestBase
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public async Task Test17710()
|
||||||
|
{
|
||||||
|
using (HttpClient client = CreateHttpClient())
|
||||||
|
{
|
||||||
|
const string text = "THE POST CONTENT";
|
||||||
|
var data = new StringContent(text);
|
||||||
|
await LoopbackServer.CreateServerAsync(async (server, url) =>
|
||||||
|
{
|
||||||
|
Task serverTask1 = server.AcceptConnectionAsync(async connection1 =>
|
||||||
|
{
|
||||||
|
await connection1.ReadRequestHeaderAsync();
|
||||||
|
var buffer = new char[text.Length];
|
||||||
|
var ret = await connection1.Reader.ReadBlockAsync(buffer, 0, buffer.Length);
|
||||||
|
Assert.Equal(text.Length, ret);
|
||||||
|
await connection1.SendResponseAsync(HttpStatusCode.OK, null, "hello");
|
||||||
|
await Task.Delay(500);
|
||||||
|
connection1.Dispose();
|
||||||
|
});
|
||||||
|
|
||||||
|
await client.PostAsync(url, data);
|
||||||
|
|
||||||
|
await serverTask1;
|
||||||
|
|
||||||
|
Task serverTask2 = server.AcceptConnectionAsync(async connection2 =>
|
||||||
|
{
|
||||||
|
await connection2.ReadRequestHeaderAsync();
|
||||||
|
var buffer = new char[text.Length];
|
||||||
|
var ret = await connection2.Reader.ReadBlockAsync(buffer, 0, buffer.Length);
|
||||||
|
Assert.Equal(text.Length, ret);
|
||||||
|
await connection2.SendResponseAsync(HttpStatusCode.OK, null, "hello");
|
||||||
|
await Task.Delay(500);
|
||||||
|
connection2.Dispose();
|
||||||
|
});
|
||||||
|
|
||||||
|
await client.PostAsync(url, data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -187,6 +187,15 @@ namespace System.Net.Sockets
|
|||||||
|
|
||||||
// Keep track of this because it will be overwritten by AttemptConnection
|
// Keep track of this because it will be overwritten by AttemptConnection
|
||||||
SocketError currentFailure = args.SocketError;
|
SocketError currentFailure = args.SocketError;
|
||||||
|
#if MONO
|
||||||
|
// Make sure we're always resetting the Mono-specific `in_progress` field when
|
||||||
|
// re-attempting a connection.
|
||||||
|
// If a previous connection failed asynchronously, then it will already have been
|
||||||
|
// resetted, but not on synchronous connection failures (such as for instance, the
|
||||||
|
// host not supporting IPv6 or the network being down).
|
||||||
|
// This should fix https://github.com/mono/mono/issues/18030.
|
||||||
|
args.in_progress = 0;
|
||||||
|
#endif
|
||||||
Exception connectException = AttemptConnection();
|
Exception connectException = AttemptConnection();
|
||||||
|
|
||||||
if (connectException == null)
|
if (connectException == null)
|
||||||
|
@ -41,7 +41,7 @@ static partial class Consts
|
|||||||
// Use these assembly version constants to make code more maintainable.
|
// Use these assembly version constants to make code more maintainable.
|
||||||
//
|
//
|
||||||
|
|
||||||
public const string MonoVersion = "6.8.0.92";
|
public const string MonoVersion = "6.8.0.95";
|
||||||
public const string MonoCompany = "Mono development team";
|
public const string MonoCompany = "Mono development team";
|
||||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||||
public const string MonoCopyright = "(c) Various Mono authors";
|
public const string MonoCopyright = "(c) Various Mono authors";
|
||||||
|
@ -1 +1 @@
|
|||||||
7c1da8742597f6660c042c03ff11d30008a67e65
|
b18e8f8fc808314f0bd5d9db4efbe8b9ac4d21a0
|
@ -1 +1 @@
|
|||||||
e691ea5e21af141655735f8d9691d8ff5b06be96
|
f6f8d0b05ebac65dbd253511d88708db62560880
|
@ -1 +1 @@
|
|||||||
720df441200162ca0519105808f019dad4139afc
|
334a143b5e7ccd8e120b3ceeb20460aba527bd92
|
@ -1 +1 @@
|
|||||||
fa39d39f4d05c288fe698177b8974f92f7cc2a9a
|
c46287bc4da9298130e80bec9c7ea258fb0ae0e9
|
@ -1 +1 @@
|
|||||||
e41e90ce5c31929399abcda80843a8bfce4bd009
|
5fc58a69d67cfd5f621cdf71146508cd165cd069
|
@ -1 +1 @@
|
|||||||
eb4f894ce6172cf836822ebe31020c3b55ebdc4d
|
72da64886b1e1b7be52cfce60e1d5d76c9302efe
|
@ -1 +1 @@
|
|||||||
b6716754948d7efce40aa18bffdbf0cfce6ca68b
|
9ed745d33db923ec20a3aa2fc4f6eca2e7f32b66
|
@ -1 +1 @@
|
|||||||
29633af9bdd9547d92140e4f6b94e624efc889dd
|
51c742b93e604e3680f39bb5f52a43e3dde60565
|
@ -1 +1 @@
|
|||||||
b9ab9f79a978ef2b4c2329ec761d044f92b1da9e
|
e37511b1871a2ff62b8a917600e19c71a9ba0457
|
@ -1 +1 @@
|
|||||||
7c1da8742597f6660c042c03ff11d30008a67e65
|
b18e8f8fc808314f0bd5d9db4efbe8b9ac4d21a0
|
@ -1 +1 @@
|
|||||||
e691ea5e21af141655735f8d9691d8ff5b06be96
|
f6f8d0b05ebac65dbd253511d88708db62560880
|
@ -1 +1 @@
|
|||||||
720df441200162ca0519105808f019dad4139afc
|
334a143b5e7ccd8e120b3ceeb20460aba527bd92
|
@ -1 +1 @@
|
|||||||
fa39d39f4d05c288fe698177b8974f92f7cc2a9a
|
c46287bc4da9298130e80bec9c7ea258fb0ae0e9
|
@ -1 +1 @@
|
|||||||
e41e90ce5c31929399abcda80843a8bfce4bd009
|
5fc58a69d67cfd5f621cdf71146508cd165cd069
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user