Imported Upstream version 5.14.0.148
Former-commit-id: ccfce85f9487e4135d045a812192413d573f33be
This commit is contained in:
parent
7aa1346787
commit
01c08d50e8
@ -1 +1 @@
|
||||
713caa60a19e1ee461b6a5c649af0cc5b13ed0d8
|
||||
e789bf066e17b66380a6d80f845e05195c813c63
|
@ -1 +1 @@
|
||||
55898c9df985bda0d229f0e58ed686a170b20ebd
|
||||
af067b29dfbfeb81540f1127a7bd9613dd7b0bfa
|
@ -34,7 +34,7 @@ static class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "5.14.0.147";
|
||||
public const string MonoVersion = "5.14.0.148";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -769,7 +769,7 @@ namespace MonoTests.System.Net.Http
|
||||
client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Wait ();
|
||||
Assert.Fail ("#1");
|
||||
} catch (AggregateException e) {
|
||||
Assert.AreEqual (typeof (ProtocolViolationException), e.InnerException.GetType (), "#2");
|
||||
Assert.AreEqual (typeof (InvalidOperationException), e.InnerException.GetType (), "#2");
|
||||
}
|
||||
Assert.IsNull (failed, "#102");
|
||||
} finally {
|
||||
|
@ -434,7 +434,6 @@ namespace System.Net
|
||||
}
|
||||
|
||||
public string Host {
|
||||
|
||||
get {
|
||||
Uri uri = hostUri ?? Address;
|
||||
return (hostUri == null || !hostHasPort) && Address.IsDefaultPort ?
|
||||
@ -858,22 +857,21 @@ namespace System.Net
|
||||
if (Aborted)
|
||||
throw CreateRequestAbortedException ();
|
||||
|
||||
bool send = !(method == "GET" || method == "CONNECT" || method == "HEAD" ||
|
||||
method == "TRACE");
|
||||
bool send = !(method == "GET" || method == "CONNECT" || method == "HEAD" || method == "TRACE");
|
||||
if (method == null || !send)
|
||||
throw new ProtocolViolationException ("Cannot send data when method is: " + method);
|
||||
throw new ProtocolViolationException (SR.net_nouploadonget);
|
||||
|
||||
if (contentLength == -1 && !sendChunked && !allowBuffering && KeepAlive)
|
||||
throw new ProtocolViolationException ("Content-Length not set");
|
||||
|
||||
string transferEncoding = TransferEncoding;
|
||||
if (!sendChunked && transferEncoding != null && transferEncoding.Trim () != "")
|
||||
throw new ProtocolViolationException ("SendChunked should be true.");
|
||||
throw new InvalidOperationException (SR.net_needchunked);
|
||||
|
||||
WebOperation operation;
|
||||
lock (locker) {
|
||||
if (getResponseCalled)
|
||||
throw new InvalidOperationException ("The operation cannot be performed once the request has been submitted.");
|
||||
throw new InvalidOperationException (SR.net_reqsubmitted);
|
||||
|
||||
operation = currentOperation;
|
||||
if (operation == null) {
|
||||
@ -900,7 +898,7 @@ namespace System.Net
|
||||
try {
|
||||
return TaskToApm.End<Stream> (asyncResult);
|
||||
} catch (Exception e) {
|
||||
throw FlattenException (e);
|
||||
throw GetWebException (e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -909,7 +907,7 @@ namespace System.Net
|
||||
try {
|
||||
return GetRequestStreamAsync ().Result;
|
||||
} catch (Exception e) {
|
||||
throw FlattenException (e);
|
||||
throw GetWebException (e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -925,17 +923,18 @@ namespace System.Net
|
||||
}
|
||||
|
||||
internal static Task<T> RunWithTimeout<T> (
|
||||
Func<CancellationToken, Task<T>> func, int timeout, Action abort)
|
||||
Func<CancellationToken, Task<T>> func, int timeout, Action abort,
|
||||
Func<bool> aborted, CancellationToken cancellationToken)
|
||||
{
|
||||
var cts = CancellationTokenSource.CreateLinkedTokenSource (cancellationToken);
|
||||
// Call `func` here to propagate any potential exception that it
|
||||
// might throw to our caller rather than returning a faulted task.
|
||||
var cts = new CancellationTokenSource ();
|
||||
var workerTask = func (cts.Token);
|
||||
return RunWithTimeoutWorker (workerTask, timeout, abort, cts);
|
||||
return RunWithTimeoutWorker (workerTask, timeout, abort, aborted, cts);
|
||||
}
|
||||
|
||||
static async Task<T> RunWithTimeoutWorker<T> (
|
||||
Task<T> workerTask, int timeout, Action abort,
|
||||
Task<T> workerTask, int timeout, Action abort, Func<bool> aborted,
|
||||
CancellationTokenSource cts)
|
||||
{
|
||||
try {
|
||||
@ -949,7 +948,7 @@ namespace System.Net
|
||||
}
|
||||
throw new WebException (SR.net_timeout, WebExceptionStatus.Timeout);
|
||||
} catch (Exception ex) {
|
||||
throw FlattenException (ex);
|
||||
throw GetWebException (ex, aborted ());
|
||||
} finally {
|
||||
cts.Dispose ();
|
||||
}
|
||||
@ -957,7 +956,11 @@ namespace System.Net
|
||||
|
||||
Task<T> RunWithTimeout<T> (Func<CancellationToken, Task<T>> func)
|
||||
{
|
||||
return RunWithTimeout (func, timeout, Abort);
|
||||
// Call `func` here to propagate any potential exception that it
|
||||
// might throw to our caller rather than returning a faulted task.
|
||||
var cts = new CancellationTokenSource ();
|
||||
var workerTask = func (cts.Token);
|
||||
return RunWithTimeoutWorker (workerTask, timeout, Abort, () => Aborted, cts);
|
||||
}
|
||||
|
||||
async Task<HttpWebResponse> MyGetResponseAsync (CancellationToken cancellationToken)
|
||||
@ -965,13 +968,6 @@ namespace System.Net
|
||||
if (Aborted)
|
||||
throw CreateRequestAbortedException ();
|
||||
|
||||
if (method == null)
|
||||
throw new ProtocolViolationException ("Method is null.");
|
||||
|
||||
string transferEncoding = TransferEncoding;
|
||||
if (!sendChunked && transferEncoding != null && transferEncoding.Trim () != "")
|
||||
throw new ProtocolViolationException ("SendChunked should be true.");
|
||||
|
||||
var completion = new WebCompletionSource ();
|
||||
WebOperation operation;
|
||||
lock (locker) {
|
||||
@ -1145,13 +1141,18 @@ namespace System.Net
|
||||
}
|
||||
|
||||
WebException GetWebException (Exception e)
|
||||
{
|
||||
return GetWebException (e, Aborted);
|
||||
}
|
||||
|
||||
static WebException GetWebException (Exception e, bool aborted)
|
||||
{
|
||||
e = FlattenException (e);
|
||||
if (e is WebException wexc) {
|
||||
if (!Aborted || wexc.Status == WebExceptionStatus.RequestCanceled || wexc.Status == WebExceptionStatus.Timeout)
|
||||
if (!aborted || wexc.Status == WebExceptionStatus.RequestCanceled || wexc.Status == WebExceptionStatus.Timeout)
|
||||
return wexc;
|
||||
}
|
||||
if (Aborted || e is OperationCanceledException || e is ObjectDisposedException)
|
||||
if (aborted || e is OperationCanceledException || e is ObjectDisposedException)
|
||||
return CreateRequestAbortedException ();
|
||||
return new WebException (e.Message, e, WebExceptionStatus.UnknownError, null);
|
||||
}
|
||||
@ -1166,6 +1167,20 @@ namespace System.Net
|
||||
if (Aborted)
|
||||
throw CreateRequestAbortedException ();
|
||||
|
||||
string transferEncoding = TransferEncoding;
|
||||
if (!sendChunked && transferEncoding != null && transferEncoding.Trim () != "") {
|
||||
/*
|
||||
* The only way we could get here without already catching this in the
|
||||
* `TransferEncoding` property settor is via HttpClient, which does not
|
||||
* do strict checking on all headers.
|
||||
*
|
||||
* We can remove this check again after switching to the CoreFX version
|
||||
* of HttpClient.
|
||||
*
|
||||
*/
|
||||
throw new InvalidOperationException (SR.net_needchunked);
|
||||
}
|
||||
|
||||
return TaskToApm.Begin (RunWithTimeout (MyGetResponseAsync), callback, state);
|
||||
}
|
||||
|
||||
@ -1177,7 +1192,7 @@ namespace System.Net
|
||||
try {
|
||||
return TaskToApm.End<HttpWebResponse> (asyncResult);
|
||||
} catch (Exception e) {
|
||||
throw FlattenException (e);
|
||||
throw GetWebException (e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1195,7 +1210,7 @@ namespace System.Net
|
||||
try {
|
||||
return GetResponseAsync ().Result;
|
||||
} catch (Exception e) {
|
||||
throw FlattenException (e);
|
||||
throw GetWebException (e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ namespace System.Net
|
||||
ReadTimeout, () => {
|
||||
Operation.Abort ();
|
||||
InnerStream.Dispose ();
|
||||
}).ConfigureAwait (false);
|
||||
}, () => Operation.Aborted, cancellationToken).ConfigureAwait (false);
|
||||
} catch (Exception e) {
|
||||
throwMe = GetReadException (WebExceptionStatus.ReceiveFailure, e, "ReadAsync");
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
befc828e193756128a4b0755432ce5d10d2cc1e4
|
||||
b81e5105b4a226b866e9d4b525c04d6024ed558b
|
@ -1 +1 @@
|
||||
5c0ce009774f46b70774aaa482b92dc2e5314b5c
|
||||
d562da103406d82c4e5700336bbb136672c0b595
|
@ -1 +1 @@
|
||||
0877f763271af8603501edfa1e24eaf3e318198e
|
||||
8e12b0c40d4b90a82ade721f380a924720127548
|
@ -1 +1 @@
|
||||
09995e4e66ac0a22fe41587750417656bfce0821
|
||||
1f42617e7b8e00a04125fc85967729855b0bbd3c
|
@ -1 +1 @@
|
||||
5e3eda678d1f01b2aa295f260a86a9621a1396b3
|
||||
fda09093e5973afedf30878b4b04bcdb9ce7302f
|
@ -1 +1 @@
|
||||
c218c037bb6d75c7b3868cc3ce7ef93c29ef1b3d
|
||||
0d4c53cdf0f5e83e2808231a255da37be341cbca
|
@ -1 +1 @@
|
||||
4eaf1e484ad4d32e688d1fd92002bc14e8d9b408
|
||||
6cd85b1ade15d3d15c5d45f15729344bfc58f191
|
@ -1 +1 @@
|
||||
8d8905f64181bf039084412317cab6664dd1577f
|
||||
9aca22f64e9b0800a2247930d7d53ddb4570059f
|
@ -1 +1 @@
|
||||
befc828e193756128a4b0755432ce5d10d2cc1e4
|
||||
b81e5105b4a226b866e9d4b525c04d6024ed558b
|
@ -1 +1 @@
|
||||
5c0ce009774f46b70774aaa482b92dc2e5314b5c
|
||||
d562da103406d82c4e5700336bbb136672c0b595
|
@ -1 +1 @@
|
||||
0877f763271af8603501edfa1e24eaf3e318198e
|
||||
8e12b0c40d4b90a82ade721f380a924720127548
|
@ -1 +1 @@
|
||||
09995e4e66ac0a22fe41587750417656bfce0821
|
||||
1f42617e7b8e00a04125fc85967729855b0bbd3c
|
@ -1 +1 @@
|
||||
5e3eda678d1f01b2aa295f260a86a9621a1396b3
|
||||
fda09093e5973afedf30878b4b04bcdb9ce7302f
|
@ -1 +1 @@
|
||||
c218c037bb6d75c7b3868cc3ce7ef93c29ef1b3d
|
||||
0d4c53cdf0f5e83e2808231a255da37be341cbca
|
@ -1 +1 @@
|
||||
4eaf1e484ad4d32e688d1fd92002bc14e8d9b408
|
||||
6cd85b1ade15d3d15c5d45f15729344bfc58f191
|
@ -1 +1 @@
|
||||
8d8905f64181bf039084412317cab6664dd1577f
|
||||
9aca22f64e9b0800a2247930d7d53ddb4570059f
|
@ -1 +1 @@
|
||||
befc828e193756128a4b0755432ce5d10d2cc1e4
|
||||
b81e5105b4a226b866e9d4b525c04d6024ed558b
|
@ -1 +1 @@
|
||||
5c0ce009774f46b70774aaa482b92dc2e5314b5c
|
||||
d562da103406d82c4e5700336bbb136672c0b595
|
@ -1 +1 @@
|
||||
0877f763271af8603501edfa1e24eaf3e318198e
|
||||
8e12b0c40d4b90a82ade721f380a924720127548
|
@ -1 +1 @@
|
||||
09995e4e66ac0a22fe41587750417656bfce0821
|
||||
1f42617e7b8e00a04125fc85967729855b0bbd3c
|
@ -1 +1 @@
|
||||
5e3eda678d1f01b2aa295f260a86a9621a1396b3
|
||||
fda09093e5973afedf30878b4b04bcdb9ce7302f
|
@ -1 +1 @@
|
||||
c218c037bb6d75c7b3868cc3ce7ef93c29ef1b3d
|
||||
0d4c53cdf0f5e83e2808231a255da37be341cbca
|
@ -1 +1 @@
|
||||
4eaf1e484ad4d32e688d1fd92002bc14e8d9b408
|
||||
6cd85b1ade15d3d15c5d45f15729344bfc58f191
|
@ -1 +1 @@
|
||||
8d8905f64181bf039084412317cab6664dd1577f
|
||||
9aca22f64e9b0800a2247930d7d53ddb4570059f
|
@ -1 +1 @@
|
||||
#define FULL_VERSION "explicit/3645833"
|
||||
#define FULL_VERSION "explicit/d0bb0ce"
|
||||
|
BIN
po/mcs/de.gmo
BIN
po/mcs/de.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
5037f0a0d0e6f285f1bc22f8504e95fe27137c93
|
||||
cf13e946b0ca24c9f81b985f48bfb79ad4be4145
|
BIN
po/mcs/es.gmo
BIN
po/mcs/es.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
c230238a3cd9158ba72f112956ffc95b7d746821
|
||||
fd513a0cf57ccca8719e734438ca1c504ef26132
|
BIN
po/mcs/ja.gmo
BIN
po/mcs/ja.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
d633618cc9cb3e22c7ad209dceda11bb2c56a3b7
|
||||
3607588cbe016ea6780d62dbb000dd8f275929d2
|
@ -6,9 +6,9 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mono 5.14.0.147\n"
|
||||
"Project-Id-Version: mono 5.14.0.148\n"
|
||||
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
|
||||
"POT-Creation-Date: 2018-06-26 08:02+0000\n"
|
||||
"POT-Creation-Date: 2018-06-28 08:03+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
BIN
po/mcs/pt_BR.gmo
BIN
po/mcs/pt_BR.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
d6836e7be2aa66b62b3b706b24b764b223574f29
|
||||
aa5447eefa7b1263ac6fbfcf00dcda715382050d
|
Loading…
x
Reference in New Issue
Block a user