This patch builds upon commit 96a8500795 which placed parts of Mono.Security
responsible for dealing with SSL/TLS certificates for the purpose of certificate verification. The code enables
validation of the certifcates even if the user does not provide their own validation callback. The changes as related to
the original commit are few, basically consisting of enabling the same code used by MonoTouch in the MonoDroid context with
the only actual code change being the certificate validation bit mentioned above.
Since the change involves adding a subset of Mono.Security files to the monodroid version of System.dll, it is
also necessary to remove Mono.Android's dependence on Mono.Security.dll. The reason is that the code in AndroidPlatform
which looks up TLS support methods in Mono.Android.dll would use a type (X509CertificateCollection) that is now part of
System.dll but is *also* in Mono.Security.dll referenced by Mono.Android.dll and therefore the lookup would fail since
we'd have two distinct types from the reflection point of view.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=18962
Idle connections that never received any data or had ever been
associated to a listener are properly closed now when the endpoint is
closed or the last listener they used is closed.
Fixes a bunch of tests in System.ServiceModel.
Use a timer to handle read timeouts and extend reuses to regular
connections, not just chunked. The timer is set to 90s for the first
request and 15s for subsequent requests.
* HttpListener.cs:
* HttpListenerRequest.cs:
* ListenerAsyncResult.cs:
* HttpConnection.cs: make sure there is no pending input when reusing
the connection.
svn path=/trunk/mcs/; revision=153300
* HttpListenerRequest.cs: add the right status code.
* HttpConnection.cs: exception might come from more places when
reading the input. Catch all of them.
svn path=/trunk/mcs/; revision=142004
* HttpConnection.cs: we were not writing the headers for 0-length
responses.
* WebConnectionStream.cs: for 204/304 responses with an explicit
content-length of 0, release the socket only once.
Fixes bug #465638.
svn path=/trunk/mcs/; revision=123250
* HttpConnection.cs: remove CWL. When reusing, BeginReadRequest might
throw if the client closes.
* HttpListenerResponse.cs: close the connection for 1.0 clients.
svn path=/trunk/mcs/; revision=119225
* HttpConnection.cs:
* HttpListenerResponse.cs: fix typo that caused the "connection close"
header to be sent. Do not close the socket when the encoding is not
chunked and reuse is possible.
Fixes bug #433371.
svn path=/trunk/mcs/; revision=115250
* HttpListenerPrefixCollection.cs, EndPointListener.cs,
HttpListener.cs, EndPointManager.cs, HttpConnection.cs: Remove
generics support where necessary to allow this code to be reused
in the 1.0 profile.
svn path=/trunk/mcs/; revision=112922
* HttpConnection.cs: when the content length is available, keep it
updated after synchronous read. Renamed 'available' to 'remaining_body'.
* RequestStream.cs: when creating the stream, pass the remaining length
starting from the offset in the buffer.
svn path=/trunk/mcs/; revision=64584
* HttpWebRequest.cs: don't send the expect-100 if if there's no content.
* HttpListenerRequest.cs:
* HttpConnection.cs:
* RequestStream.cs: use the content length header to avoid reading past
the end of the stream.
Patch by Horst Reiterer.
svn path=/trunk/mcs/; revision=56658