Fixes issues where ResponseStream.Close would throw an exception when
peer had already closed the connection and ResponseStream.Close would
still try to communicating to peer that it was closing.
The issue was brought to our attention by failures on:
- MonoTests.System.Net.WebRequestTest.TestReceiveCancelation
- MonoTests.System.Net.HttpWebRequestTest.TestLargeDataReading
Modulo the GUID in the assembly and the GUID embedded in some
field initializers that use the assembly GUID for their name, the
assemblies are idential before and after the patch.
* HttpWebRequest.cs: don't call ProxyRequest twice.
* WebConnectionData.cs: remove unused fields.
* WebConnection.cs:
* WebConnectionStream.cs: when setting the input buffer, check to see
if the entire response is already there and free up the request slot.
Fixes bug #423156.
* ResponseStream.cs:
* HttpListenerResponse.cs: buffer the headers so that they are sent
together with the data on the first Write (if any). The fix above
didn't work with our HttpListener without this.
svn path=/trunk/mcs/; revision=116868
* ResponseStream.cs: Do not Close the HttpResponse object here as
it is possible to issue multiple OutputStream.Close calls (they
actually happen implicitly through things like StreamWriter.Close,
and they are in various MSDN samples).
2008-05-28 Gonzalo Paniagua Javier <[email protected]>
svn path=/trunk/mcs/; revision=105259