Imported Upstream version 5.4.0.167

Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-08-21 15:34:15 +00:00
parent e49d6f06c0
commit 536cd135cc
12856 changed files with 563812 additions and 223249 deletions

View File

@ -27,29 +27,17 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if SECURITY_DEP
#if MONO_SECURITY_ALIAS
extern alias MonoSecurity;
#endif
#if MONO_SECURITY_ALIAS
using MSI = MonoSecurity::Mono.Security.Interface;
#else
using MSI = Mono.Security.Interface;
#endif
using System.IO;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Net.Security;
using System.Security.Authentication;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using Mono.Net.Security;
namespace System.Net {
sealed class HttpConnection
{
sealed class HttpConnection {
static AsyncCallback onread_cb = new AsyncCallback (OnRead);
const int BufferSize = 8192;
Socket sock;
@ -73,7 +61,7 @@ namespace System.Net {
HttpListener last_listener;
int [] client_cert_errors;
X509Certificate2 client_cert;
IMonoSslStream ssl_stream;
SslStream ssl_stream;
public HttpConnection (Socket sock, EndPointListener epl, bool secure, X509Certificate cert)
{
@ -94,7 +82,7 @@ namespace System.Net {
client_cert_errors = new int[] { (int)e };
return true;
});
stream = ssl_stream.AuthenticatedStream;
stream = ssl_stream;
}
timer = new Timer (OnTimeout, null, Timeout.Infinite, Timeout.Infinite);
if (ssl_stream != null)
@ -102,6 +90,10 @@ namespace System.Net {
Init ();
}
internal SslStream SslStream {
get { return ssl_stream; }
}
internal int [] ClientCertificateErrors {
get { return client_cert_errors; }
}
@ -387,7 +379,7 @@ namespace System.Net {
HttpListenerResponse response = context.Response;
response.StatusCode = status;
response.ContentType = "text/html";
string description = HttpListenerResponseHelper.GetStatusDescription (status);
string description = HttpStatusDescription.Get (status);
string str;
if (msg != null)
str = String.Format ("<h1>{0} ({1})</h1>", description, msg);
@ -491,5 +483,4 @@ namespace System.Net {
}
}
}
#endif