Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.Web/System.Web.Configuration')
-rw-r--r--mcs/class/System.Web/System.Web.Configuration/ChangeLog5
-rw-r--r--mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs14
2 files changed, 13 insertions, 6 deletions
diff --git a/mcs/class/System.Web/System.Web.Configuration/ChangeLog b/mcs/class/System.Web/System.Web.Configuration/ChangeLog
index 2f67b0fee83..1347030a0e7 100644
--- a/mcs/class/System.Web/System.Web.Configuration/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Configuration/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * WebConfigurationSettings.cs: fix bug when processing empty location
+ tags. Closes bug #63001.
+
2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* AuthorizationConfig.cs: really fix bug #60482. Thanks David!
diff --git a/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs b/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs
index e00c1921978..ee47037cbfa 100644
--- a/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs
+++ b/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs
@@ -791,16 +791,13 @@ namespace System.Web.Configuration
void StoreLocation (string name, XmlTextReader reader)
{
- if (locations == null) {
- locations = new Hashtable ();
- }
-
string path = null;
bool haveAllow = false;
bool allowOverride = true;
+ string att = null;
while (reader.MoveToNextAttribute ()) {
- string att = reader.Name;
+ att = reader.Name;
if (att == "path") {
if (path != null)
@@ -830,8 +827,13 @@ namespace System.Web.Configuration
ThrowException ("Unrecognized attribute.", reader);
}
+ if (att == null)
+ return; // empty location tag
+
Location loc = new Location (this, path, allowOverride);
- if (locations.ContainsKey (loc.Path))
+ if (locations == null)
+ locations = new Hashtable ();
+ else if (locations.ContainsKey (loc.Path))
ThrowException ("Duplicated location path: " + loc.Path, reader);
reader.MoveToElement ();