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