https://bugzilla.novell.com/show_bug.cgi?id=685368
https://bugzilla.novell.com/show_bug.cgi?id=685368#c0 Summary: Behavior difference with HttpWebResponse.Close between Mono and .Net Classification: Mono Product: Mono: Class Libraries Version: 2.10.x Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: CORLIB AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- After calling Close () on an HttpWebResponse in Mono, the object will be completely unusable as it's been marked as disposed. However, in .NET accessing certain properties on the object is allowed after the Close () call, which seems most reasonable. I think Mono's implementation is too strict. Close should only free resources that may otherwise not be collected during a regular GC and/or release resources back into some pool for further immediate IO, etc. Below is a simple test case. It will print the ResponseUri when running on .NET ("http://www.reddit.com" as of the time of this filing) but on Mono calling get_ResourceUri will throw System.ObjectDisposedException. using System; using System.Net; public static class HttpWebResponseDisposalTest { public static void Main () { var request = (HttpWebRequest)HttpWebRequest.Create ("http://reddit.com"); var response = request.GetResponse (); response.Close (); Console.WriteLine (response.ResponseUri); } } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
