Imported Upstream version 4.6.0.125

Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-08-03 10:59:49 +00:00
parent a569aebcfd
commit e79aa3c0ed
17047 changed files with 3137615 additions and 392334 deletions

View File

@@ -480,7 +480,7 @@ namespace System.Net
AsyncCallback cb, object state)
{
if (request.Aborted)
throw new WebException ("The request was canceled.", null, WebExceptionStatus.RequestCanceled);
throw new WebException ("The request was canceled.", WebExceptionStatus.RequestCanceled);
if (isRead)
throw new NotSupportedException ("this stream does not allow writing");
@@ -675,7 +675,7 @@ namespace System.Net
} catch (WebException e) {
result.SetCompleted (false, e);
} catch (Exception e) {
result.SetCompleted (false, new WebException ("Error writing headers", e, WebExceptionStatus.SendFailure));
result.SetCompleted (false, new WebException ("Error writing headers", WebExceptionStatus.SendFailure, WebExceptionInternalStatus.RequestFatal, e));
}
}, null);
@@ -814,7 +814,7 @@ namespace System.Net
IOException io = new IOException ("Cannot close the stream until all bytes are written");
nextReadCalled = true;
cnc.Close (true);
throw new WebException ("Request was cancelled.", io, WebExceptionStatus.RequestCanceled);
throw new WebException ("Request was cancelled.", WebExceptionStatus.RequestCanceled, WebExceptionInternalStatus.RequestFatal, io);
}
// Commented out the next line to fix xamarin bug #1512