Merge pull request #4433 from kumpera/android-fixes
[mono.git] / mcs / class / System / System.Net / HttpConnection.cs
index 7adfdf8d95660c51e673d3304118705a55d19d0a..b9940eb07d89585b683f2904aa1b0fb49aa84157 100644 (file)
 #if MONO_SECURITY_ALIAS
 extern alias MonoSecurity;
 #endif
-#if MONO_X509_ALIAS
-extern alias PrebuiltSystem;
-#endif
 
 #if MONO_SECURITY_ALIAS
 using MSI = MonoSecurity::Mono.Security.Interface;
 #else
 using MSI = Mono.Security.Interface;
 #endif
-#if MONO_X509_ALIAS
-using XX509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
-#else
-using XX509CertificateCollection = System.Security.Cryptography.X509Certificates.X509CertificateCollection;
-#endif
 
 using System.IO;
 using System.Net.Sockets;
@@ -209,8 +201,11 @@ namespace System.Net {
                        // TODO: can we get this stream before reading the input?
                        if (o_stream == null) {
                                HttpListener listener = context.Listener;
-                               bool ign = (listener == null) ? true : listener.IgnoreWriteExceptions;
-                               o_stream = new ResponseStream (stream, context.Response, ign);
+                               
+                               if(listener == null)
+                                       return new ResponseStream (stream, context.Response, true);
+
+                               o_stream = new ResponseStream (stream, context.Response, listener.IgnoreWriteExceptions);
                        }
                        return o_stream;
                }
@@ -394,7 +389,7 @@ namespace System.Net {
                                HttpListenerResponse response = context.Response;
                                response.StatusCode = status;
                                response.ContentType = "text/html";
-                               string description = HttpListenerResponse.GetStatusDescription (status);
+                               string description = HttpListenerResponseHelper.GetStatusDescription (status);
                                string str;
                                if (msg != null)
                                        str = String.Format ("<h1>{0} ({1})</h1>", description, msg);