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:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-08-23 00:42:27 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-08-23 00:42:27 +0400
commit15c8c05104422be337d6f4c9ee34d236ef22c18b (patch)
tree414815a060bffdc74830155f3f538f84e2881136 /mcs/class/System.Web
parente44cc4ce5408bb8175bed136371f61b57ca21c1b (diff)
2004-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* WebConfigurationSettings.cs: fix bug when processing empty location tags. Closes bug #63001. svn path=/trunk/mcs/; revision=32667
Diffstat (limited to 'mcs/class/System.Web')
-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 d6826b7530b..186fb4763a7 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-08-02 Duncan Mak <duncan@ximian.com>
* AuthorizationRuleAction.cs:
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 ();