Imported Upstream version 5.8.0.22

Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-10-19 20:04:20 +00:00
parent 5f4a27cc8a
commit 7d05485754
5020 changed files with 114082 additions and 186061 deletions

View File

@@ -69,7 +69,9 @@ namespace System.Net
}
}
#else
#pragma warning disable 618
ConfigurationSettings.GetConfig ("system.net/authenticationModules");
#pragma warning restore 618
#endif
}
}

View File

@@ -204,7 +204,7 @@ namespace System.Net
public DigestSession ()
{
_nc = 1;
lastUse = DateTime.Now;
lastUse = DateTime.UtcNow;
}
public string Algorithm {
@@ -305,7 +305,7 @@ namespace System.Net
if (request == null)
return null;
lastUse = DateTime.Now;
lastUse = DateTime.UtcNow;
NetworkCredential cred = credentials.GetCredential (request.RequestUri, "digest");
if (cred == null)
return null;
@@ -378,7 +378,7 @@ namespace System.Net
return;
DateTime t = DateTime.MaxValue;
DateTime now = DateTime.Now;
DateTime now = DateTime.UtcNow;
ArrayList list = null;
foreach (int key in cache.Keys) {
DigestSession elem = (DigestSession) cache [key];

View File

@@ -320,9 +320,11 @@ namespace System.Net {
try {
IPAddress newAddress = IPAddress.Parse(h_addrlist[i]);
#pragma warning disable 618
if( (Socket.SupportsIPv6 && newAddress.AddressFamily == AddressFamily.InterNetworkV6) ||
(Socket.SupportsIPv4 && newAddress.AddressFamily == AddressFamily.InterNetwork) )
addrlist.Add(newAddress);
#pragma warning restore 618
} catch (ArgumentNullException) {
/* Ignore this, as the
* internal call might have
@@ -393,7 +395,9 @@ namespace System.Net {
if (hostNameOrAddress.Length > 0 && IPAddress.TryParse (hostNameOrAddress, out addr))
return GetHostEntry (addr);
#pragma warning disable 618
return GetHostByName (hostNameOrAddress);
#pragma warning restore 618
}
public static IPHostEntry GetHostEntry (IPAddress address)

View File

@@ -84,7 +84,9 @@ namespace System.Net {
addr = IPAddress.Any;
else if (IPAddress.TryParse(host, out addr) == false){
try {
#pragma warning disable 618
IPHostEntry iphost = Dns.GetHostByName(host);
#pragma warning restore 618
if (iphost != null)
addr = iphost.AddressList[0];
else

View File

@@ -113,7 +113,9 @@ namespace System.Net
internal FtpWebRequest (Uri uri)
{
this.requestUri = uri;
#pragma warning disable 618
this.proxy = GlobalProxySelection.Select;
#pragma warning restore 618
}
static Exception GetMustImplement ()

View File

@@ -330,16 +330,20 @@ namespace System.Net {
if (current != null) {
cookies.Add (current);
}
current = new Cookie ();
int idx = str.IndexOf ('=');
if (idx > 0) {
current.Name = str.Substring (0, idx).Trim ();
current.Value = str.Substring (idx + 1).Trim ();
} else {
current.Name = str.Trim ();
current.Value = String.Empty;
try {
current = new Cookie ();
int idx = str.IndexOf ('=');
if (idx > 0) {
current.Name = str.Substring (0, idx).Trim ();
current.Value = str.Substring (idx + 1).Trim ();
} else {
current.Name = str.Trim ();
current.Value = String.Empty;
}
current.Version = version;
} catch (CookieException) {
current = null;
}
current.Version = version;
}
}
if (current != null) {

View File

@@ -134,7 +134,9 @@ namespace System.Net
{
defaultMaxResponseHeadersLength = 64 * 1024;
#if !MOBILE
#pragma warning disable 618
NetConfig config = ConfigurationSettings.GetConfig ("system.net/settings") as NetConfig;
#pragma warning restore 618
if (config != null) {
int x = config.MaxResponseHeadersLength;
if (x != -1)