[Mono-dev] patch for System.Net/WebException.cs
Andrew Skiba
andrews at mainsoft.com
Wed Sep 20 06:23:26 EDT 2006
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: mono-devel-list-bounces at lists.ximian.com
> [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf
> Of Andrew Skiba
> Sent: Monday, September 18, 2006 15:31
> To: mono-devel-list at 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.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Program.cs
Type: application/octet-stream
Size: 889 bytes
Desc: Program.cs
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060920/791e17e2/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WebException.patch
Type: application/octet-stream
Size: 1120 bytes
Desc: WebException.patch
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060920/791e17e2/attachment-0001.obj
More information about the Mono-devel-list
mailing list