Author: atsushi
Date: 2005-03-29 18:49:13 -0500 (Tue, 29 Mar 2005)
New Revision: 42361
Modified:
trunk/mcs/class/System.XML/System.Xml/ChangeLog
trunk/mcs/class/System.XML/System.Xml/XmlUrlResolver.cs
Log:
2005-03-30 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlUrlResolver.cs : just return connected Stream instead of fully
downloaded memory cache. Fix by Konstantin Triger.
Modified: trunk/mcs/class/System.XML/System.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/ChangeLog 2005-03-29 22:10:44 UTC
(rev 42360)
+++ trunk/mcs/class/System.XML/System.Xml/ChangeLog 2005-03-29 23:49:13 UTC
(rev 42361)
@@ -1,3 +1,8 @@
+2005-03-30 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * XmlUrlResolver.cs : just return connected Stream instead of fully
+ downloaded memory cache. Fix by Konstantin Triger.
+
2005-03-24 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlWriter.cs : WriteQualifiedName() should check namespace validity
Modified: trunk/mcs/class/System.XML/System.Xml/XmlUrlResolver.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlUrlResolver.cs 2005-03-29
22:10:44 UTC (rev 42360)
+++ trunk/mcs/class/System.XML/System.Xml/XmlUrlResolver.cs 2005-03-29
23:49:13 UTC (rev 42361)
@@ -65,14 +65,11 @@
}
// (MS documentation says) parameter role isn't used
yet.
- Stream s = null;
- using (s) {
- WebClient wc = new WebClient ();
- wc.Credentials = credential;
- byte [] data = wc.DownloadData
(absoluteUri.ToString ());
- wc.Dispose ();
- return new MemoryStream (data, 0, data.Length);
- }
+ WebRequest req = WebRequest.Create (absoluteUri);
+ if (credential != null)
+ req.Credentials = credential;
+ return req.GetResponse().GetResponseStream();
+
}
// see also XmlResolver.EscapeRelativeUriBody().
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches