Author: atsushi
Date: 2005-04-24 22:54:59 -0400 (Sun, 24 Apr 2005)
New Revision: 43525

Modified:
   branches/mono-1-0/mcs/class/System.XML/System.Xml/ChangeLog
   branches/mono-1-0/mcs/class/System.XML/System.Xml/XmlTextReader.cs
Log:
2005-04-25  Atsushi Enomoto <[EMAIL PROTECTED]>

        * XmlTextReader.cs : Check empty BaseURI before being used to
          resolve Uri. Patch by Heath Harrelson. Fixed bug #74704.



Modified: branches/mono-1-0/mcs/class/System.XML/System.Xml/ChangeLog
===================================================================
--- branches/mono-1-0/mcs/class/System.XML/System.Xml/ChangeLog 2005-04-25 
02:42:10 UTC (rev 43524)
+++ branches/mono-1-0/mcs/class/System.XML/System.Xml/ChangeLog 2005-04-25 
02:54:59 UTC (rev 43525)
@@ -1,3 +1,8 @@
+2005-04-25  Atsushi Enomoto <[EMAIL PROTECTED]>
+
+       * XmlTextReader.cs : Check empty BaseURI before being used to
+         resolve Uri. Patch by Heath Harrelson. Fixed bug #74704.
+
 2005-01-13  Atsushi Enomoto <[EMAIL PROTECTED]>
 
        * XmlResolver.cs : throw ArgumentException in ResolveUri().

Modified: branches/mono-1-0/mcs/class/System.XML/System.Xml/XmlTextReader.cs
===================================================================
--- branches/mono-1-0/mcs/class/System.XML/System.Xml/XmlTextReader.cs  
2005-04-25 02:42:10 UTC (rev 43524)
+++ branches/mono-1-0/mcs/class/System.XML/System.Xml/XmlTextReader.cs  
2005-04-25 02:54:59 UTC (rev 43525)
@@ -40,7 +40,7 @@
 
 using System;
 using System.Collections;
-using System.Globalization;
+using System.Globalization;
 using System.IO;
 using System.Security.Policy;
 using System.Text;
@@ -1332,8 +1332,17 @@
 
                        string baseUri = GetAttribute ("xml:base");
                        if (baseUri != null) {
-                               if (this.resolver != null)
-                                       parserContext.BaseURI = 
resolver.ResolveUri (new Uri (BaseURI), baseUri).ToString ();
+                               if (this.resolver != null) {
+                                       Uri buri =
+                                               BaseURI != String.Empty ?
+                                               new Uri (BaseURI) : null;
+                                       Uri uri = resolver.ResolveUri (
+                                               buri, baseUri);
+                                       parserContext.BaseURI = 
+                                               uri != null ? 
+                                               uri.ToString () :
+                                               String.Empty;
+                               }
                                else
                                        parserContext.BaseURI = baseUri;
                        }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to