2010-03-20 Miguel de Icaza <miguel@novell.com>
authorMiguel de Icaza <miguel@gnome.org>
Sat, 20 Mar 2010 22:53:39 +0000 (22:53 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sat, 20 Mar 2010 22:53:39 +0000 (22:53 -0000)
* WebConnection.cs: Drop pre-2.0 and pre-1.1 support, and remove
warnings.

svn path=/trunk/mcs/; revision=153946

mcs/class/System/System.Net/ChangeLog
mcs/class/System/System.Net/WebConnection.cs

index cda97eae1cd6d4b01e55cf126e4ecda0108b46aa..d83abeb345e516543018166c5613fc82a4d11dfb 100644 (file)
@@ -1,5 +1,8 @@
 2010-03-20  Miguel de Icaza  <miguel@novell.com>
 
+       * WebConnection.cs: Drop pre-2.0 and pre-1.1 support, and remove
+       warnings. 
+
        * WebClient.cs: Drop the pre-2.0 support
 
 2010-03-19  Sebastien Pouliot  <sebastien@ximian.com>
index 5bb638c6a18876906ef85d743501206015c030ac..d197f837de4194afe12b5230902308c9fd7426e7 100644 (file)
@@ -35,7 +35,7 @@ using System.Reflection;
 using System.Security.Cryptography.X509Certificates;
 using System.Text;
 using System.Threading;
-#if (NET_2_0 || MONOTOUCH) && SECURITY_DEP
+#if SECURITY_DEP
 using Mono.Security.Protocol.Tls;
 #endif
 
@@ -73,9 +73,7 @@ namespace System.Net
                HttpWebRequest priority_request;
                NetworkCredential ntlm_credentials;
                bool ntlm_authenticated;
-#if NET_1_1
                bool unsafe_sharing;
-#endif
 
                bool ssl;
                bool certsAvailable;
@@ -164,21 +162,17 @@ namespace System.Net
 #endif
                                }
 
-                               WebConnectionData data = Data;
+                               //WebConnectionData data = Data;
                                foreach (IPAddress address in hostEntry.AddressList) {
                                        socket = new Socket (address.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
                                        IPEndPoint remote = new IPEndPoint (address, sPoint.Address.Port);
-#if NET_1_1
                                        socket.SetSocketOption (SocketOptionLevel.Tcp, SocketOptionName.NoDelay, sPoint.UseNagleAlgorithm ? 0 : 1);
-#endif
-#if NET_2_0
                                        socket.NoDelay = !sPoint.UseNagleAlgorithm;
                                        if (!sPoint.CallEndPointDelegate (socket, remote)) {
                                                socket.Close ();
                                                socket = null;
                                                status = WebExceptionStatus.ConnectFailure;
                                        } else {
-#endif
                                                try {
                                                        if (request.Aborted)
                                                                return;
@@ -192,7 +186,7 @@ namespace System.Net
                                                        if (s != null)
                                                                s.Close ();
                                                        return;
-                                               } catch (ObjectDisposedException exc) {
+                                               } catch (ObjectDisposedException) {
                                                        // socket closed from another thread
                                                        return;
                                                } catch (Exception exc) {
@@ -204,9 +198,7 @@ namespace System.Net
                                                                status = WebExceptionStatus.ConnectFailure;
                                                        connect_exception = exc;
                                                }
-#if NET_2_0
                                        }
-#endif
                                }
                        }
                }
@@ -355,7 +347,7 @@ namespace System.Net
                                                                                request.ClientCertificates,
                                                                                request, buffer};
                                                nstream = (Stream) Activator.CreateInstance (sslStream, args);
-#if (NET_2_0 || MONOTOUCH) && SECURITY_DEP
+#if SECURITY_DEP
                                                SslClientStream scs = (SslClientStream) nstream;
                                                var helper = new ServicePointManager.ChainValidationHelper (request);
                                                scs.ServerCertValidation2 += new CertificateValidationCallback2 (helper.ValidateChain);
@@ -1123,12 +1115,10 @@ namespace System.Net
                        set { ntlm_credentials = value; }
                }
 
-#if NET_1_1
                internal bool UnsafeAuthenticatedConnectionSharing {
                        get { return unsafe_sharing; }
                        set { unsafe_sharing = value; }
                }
-#endif
                // -
        }
 }