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:
authorMarek Habersack <grendel@twistedcode.net>2007-08-27 15:11:24 +0400
committerMarek Habersack <grendel@twistedcode.net>2007-08-27 15:11:24 +0400
commitdaba38037263452675c09182940fae4f27fe6e6a (patch)
treedbdcc4344f000a92f3dfcef3dd09345496b45b10
parentefba67629a8dd751e4ae963c818f93ecfcd69db2 (diff)
commit Bug #82472 fix to the branch, as it seems that's where it should go
svn path=/branches/mono-1-2-5/mcs/; revision=84869
-rw-r--r--mcs/class/System.Web/System.Web.Configuration/ChangeLog5
-rw-r--r--mcs/class/System.Web/System.Web.Configuration/PagesConfiguration.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Configuration/PagesConfigurationHandler.cs15
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog4
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/PagesEnableSessionState.cs19
-rw-r--r--mcs/class/System.Web/System.Web.UI/ChangeLog16
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageParser.cs51
7 files changed, 68 insertions, 44 deletions
diff --git a/mcs/class/System.Web/System.Web.Configuration/ChangeLog b/mcs/class/System.Web/System.Web.Configuration/ChangeLog
index f889d222ebe..c074532b67b 100644
--- a/mcs/class/System.Web/System.Web.Configuration/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Configuration/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-10 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * PagesConfigurationHandler.cs: Use enum for EnableSessionState.
+ * PagesConfiguration.cs: Use enum for EnableSessionState.
+
2007-05-01 Marek Habersack <mhabersack@novell.com>
* HttpCapabilitiesBase.cs: move the User-Agent code to a separate
diff --git a/mcs/class/System.Web/System.Web.Configuration/PagesConfiguration.cs b/mcs/class/System.Web/System.Web.Configuration/PagesConfiguration.cs
index 8066b177b23..4bc4bad718f 100644
--- a/mcs/class/System.Web/System.Web.Configuration/PagesConfiguration.cs
+++ b/mcs/class/System.Web/System.Web.Configuration/PagesConfiguration.cs
@@ -36,7 +36,7 @@ namespace System.Web.Configuration
class PagesConfiguration
{
internal bool Buffer = true;
- internal string EnableSessionState = "true";
+ internal PagesEnableSessionState EnableSessionState = PagesEnableSessionState.True;
internal bool EnableViewState = true;
internal bool EnableViewStateMac = false;
internal bool SmartNavigation = false;
diff --git a/mcs/class/System.Web/System.Web.Configuration/PagesConfigurationHandler.cs b/mcs/class/System.Web/System.Web.Configuration/PagesConfigurationHandler.cs
index e517c981e69..55c16d48fa3 100644
--- a/mcs/class/System.Web/System.Web.Configuration/PagesConfigurationHandler.cs
+++ b/mcs/class/System.Web/System.Web.Configuration/PagesConfigurationHandler.cs
@@ -48,11 +48,22 @@ namespace System.Web.Configuration
attvalue = AttValue ("enableSessionState", section);
if (attvalue != null) {
- if (attvalue != "true" && attvalue != "false" && attvalue != "ReadOnly")
+ switch (attvalue) {
+ case "true":
+ config.EnableSessionState = PagesEnableSessionState.True;
+ break;
+ case "ReadOnly":
+ config.EnableSessionState = PagesEnableSessionState.ReadOnly;
+ break;
+ case "false":
+ config.EnableSessionState = PagesEnableSessionState.False;
+ break;
+ default:
HandlersUtil.ThrowException ("The 'enableSessionState' attribute"
+ " is case sensitive and must be one of the following values:"
+ " false, true, ReadOnly.", section);
- config.EnableSessionState = attvalue;
+ break;
+ }
}
attvalue = AttValue ("enableViewState", section);
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog b/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
index ea7c1c1a72f..2d76af8c9de 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-10 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * PagesEnableSessionState.cs: Marked internal on 1.0 profile.
+
2007-07-16 Vladimir Krasnov <vladimirk@mainsoft.com>
* ProfileGroupSettingsCollection.cs: added ResetInternal internal
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/PagesEnableSessionState.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/PagesEnableSessionState.cs
index 4379e8051ff..3895dc74f42 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/PagesEnableSessionState.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/PagesEnableSessionState.cs
@@ -28,14 +28,17 @@
using System.Resources;
-#if NET_2_0
namespace System.Web.Configuration
{
- public enum PagesEnableSessionState
- {
- False = 0,
- ReadOnly = 1,
- True = 2
- }
-}
+#if NET_2_0
+ public
+#else
+ internal
#endif
+ enum PagesEnableSessionState
+ {
+ False = 0,
+ ReadOnly = 1,
+ True = 2
+ }
+}
diff --git a/mcs/class/System.Web/System.Web.UI/ChangeLog b/mcs/class/System.Web/System.Web.UI/ChangeLog
index ed37506fc56..f720b031b3f 100644
--- a/mcs/class/System.Web/System.Web.UI/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI/ChangeLog
@@ -1,7 +1,21 @@
+2007-08-10 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * PageParser.cs: Replace enableSessionState and readOnlySessionState
+ bools with enum backed field. Move 1.0 profile code for checking value
+ of EnableSessionState pages config to PagesConfigurationHandler.
+ Fixes bug #82392 for 1.0 profile.
+
+2007-08-09 Marek Habersack <mhabersack@novell.com>
+
+ * PageParser.cs: honor web.config enableSessionState
+ ReadOnly setting instead of overwriting based on default value for
+ page directive EnableSessionState. Patch from Joel Reed
+ <joelwreed@comcast.com>, thanks! Fixes bug #82392
+
2007-07-24 Igor Zelmanovich <igorz@mainsoft.com>
* ClientScriptManager.cs: fixed: GetCallbackEventReference method.
-
+
2007-07-23 Igor Zelmanovich <igorz@mainsoft.com>
* Page.cs: refactoring: __doPostBack client script
diff --git a/mcs/class/System.Web/System.Web.UI/PageParser.cs b/mcs/class/System.Web/System.Web.UI/PageParser.cs
index a128f91b372..ea4d1bc22c5 100644
--- a/mcs/class/System.Web/System.Web.UI/PageParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageParser.cs
@@ -43,14 +43,13 @@ namespace System.Web.UI
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class PageParser : TemplateControlParser
{
- bool enableSessionState = true;
+ PagesEnableSessionState enableSessionState = PagesEnableSessionState.True;
bool enableViewStateMac = true;
- bool smartNavigation = false;
+ bool smartNavigation;
bool haveTrace;
bool trace;
bool notBuffer;
TraceMode tracemode;
- bool readonlySessionState;
string responseEncoding;
string contentType;
int codepage = -1;
@@ -112,24 +111,7 @@ namespace System.Web.UI
#endif
notBuffer = !ps.Buffer;
-#if NET_2_0
- switch (ps.EnableSessionState) {
- case PagesEnableSessionState.True:
- case PagesEnableSessionState.ReadOnly:
- enableSessionState = true;
- break;
-
- default:
- enableSessionState = false;
- break;
- }
-#else
- if (String.Compare (ps.EnableSessionState, "true", true, CultureInfo.InvariantCulture) == 0)
- enableSessionState = true;
- else
- enableSessionState = false;
-#endif
-
+ enableSessionState = ps.EnableSessionState;
enableViewStateMac = ps.EnableViewStateMac;
smartNavigation = ps.SmartNavigation;
validateRequest = ps.ValidateRequest;
@@ -165,23 +147,23 @@ namespace System.Web.UI
// note: the 'enableSessionState' configuration property is
// processed in a case-sensitive manner while the page-level
// attribute is processed case-insensitive
- string enabless = GetString (atts, "EnableSessionState", enableSessionState.ToString ());
+ string enabless = GetString (atts, "EnableSessionState", null);
if (enabless != null) {
- readonlySessionState = (String.Compare (enabless, "readonly", true) == 0);
- if (readonlySessionState == true || String.Compare (enabless, "true", true) == 0) {
- enableSessionState = true;
- } else if (String.Compare (enabless, "false", true) == 0) {
- enableSessionState = false;
- } else {
+ if (String.Compare (enabless, "readonly", true) == 0)
+ enableSessionState = PagesEnableSessionState.ReadOnly;
+ else if (String.Compare (enabless, "true", true) == 0)
+ enableSessionState = PagesEnableSessionState.True;
+ else if (String.Compare (enabless, "false", true) == 0)
+ enableSessionState = PagesEnableSessionState.False;
+ else
ThrowParseException ("Invalid value for enableSessionState: " + enabless);
- }
}
string cp = GetString (atts, "CodePage", null);
if (cp != null) {
if (responseEncoding != null)
ThrowParseException ("CodePage and ResponseEncoding are " +
- "mutually exclusive.");
+ "mutually exclusive.");
int codepage = 0;
try {
@@ -436,7 +418,10 @@ namespace System.Web.UI
}
internal bool EnableSessionState {
- get { return enableSessionState; }
+ get {
+ return enableSessionState == PagesEnableSessionState.True ||
+ ReadOnlySessionState;
+ }
}
internal bool EnableViewStateMac {
@@ -448,7 +433,9 @@ namespace System.Web.UI
}
internal bool ReadOnlySessionState {
- get { return readonlySessionState; }
+ get {
+ return enableSessionState == PagesEnableSessionState.ReadOnly;
+ }
}
internal bool HaveTrace {