[Mono-bugs] [Bug 685368] Behavior difference with HttpWebResponse.Close between Mono and .Net
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Apr 6 23:04:20 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=685368
https://bugzilla.novell.com/show_bug.cgi?id=685368#c2
Gonzalo Paniagua Javier <gonzalo at novell.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |gonzalo at novell.com
Resolution| |FIXED
--- Comment #2 from Gonzalo Paniagua Javier <gonzalo at novell.com> 2011-04-07 03:04:19 UTC ---
Fixed in master/b311822 and mono-2-10/b0a314d.
Thanks!
The interesting thing is that if I replace the 'response.Close()' with a 'using
(response) {}' in your program, I get this on windows:
----------------
Z:\>close.exe
http://go-mono.com/monologue/
Z:\>dispose.exe
Unhandled Exception: System.ObjectDisposedException: Cannot access a disposed
ob
ject.
Object name: 'System.Net.HttpWebResponse'.
at System.Net.HttpWebResponse.CheckDisposed()
at System.Net.HttpWebResponse.get_ResponseUri()
at HttpWebResponseDisposalTest.Main()
---------------
So an explicit Close() must be closing the stream but does not cause ODEs later
on, while calling Dispose() will cause the properties to throw.
--
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.
More information about the mono-bugs
mailing list