Hello. The previous testcase used a null for WebResponse. This may produce an impression, that not-null response would produce a different serialization result. So please consider an improved test in the attachment. I attach the fix for WebException again, for your convenience.
Thank you. Andrew. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Andrew Skiba > Sent: Monday, September 18, 2006 15:31 > To: mono-devel-list@lists.ximian.com > Subject: [Mono-dev] patch for System.Net/WebException.cs > > Hello. > > The following code reveils 2 problems in subj: wrong initial > value for Status, and incompatibility with .Net > serialization. To check the latter, run test on .net, rename > out.xml into in.xml and run test on mono. After applying the > patch the test passes and initial value for Status is the same. > > using System; > using System.Runtime.Serialization.Formatters.Soap; > using System.Net; > using System.IO; > > namespace dumb_GH20 > { > class Program > { > static void Main (string[] args) > { > WebException def = new WebException (); > Console.Out.Write (def.Status); > WebException e = new WebException > ("message", new Exception ("inner"), > WebExceptionStatus.PipelineFailure, > null); > SoapFormatter f = new SoapFormatter (); > FileStream fs = new FileStream > ("out.xml", FileMode.CreateNew); > f.Serialize (fs, e); > > WebException e1 = (WebException) > f.Deserialize (new FileStream ("in.xml", FileMode.Open)); > } > > } > } > > Thank you. > Andrew. >
Program.cs
Description: Program.cs
WebException.patch
Description: WebException.patch
_______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list