소스 검색

* SessionStateModule.cs: Handle SessionStateMode.Off properly in
Init. Only set session cookies if a new session is created. This
fixes bug #52501.

svn path=/trunk/mcs/; revision=21492

Jackson Harper 22 년 전
부모
커밋
d0fa545f50
2개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 0
      mcs/class/System.Web/System.Web.SessionState/ChangeLog
  2. 4 1
      mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs

+ 6 - 0
mcs/class/System.Web/System.Web.SessionState/ChangeLog

@@ -1,3 +1,9 @@
+2003-12-25  Jackson Harper <[email protected]>
+
+	* SessionStateModule.cs: Handle SessionStateMode.Off properly in
+	Init. Only set session cookies if a new session is created. This
+	fixes bug #52501.
+	
 2003-12-18  Gonzalo Paniagua Javier <[email protected]>
 
 	* IStateRuntime.cs:

+ 4 - 1
mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs

@@ -64,6 +64,9 @@ namespace System.Web.SessionState
 				
 				if (config.Mode == SessionStateMode.InProc)
 					handlerType = typeof (SessionInProcHandler);
+
+                                if (config.Mode == SessionStateMode.Off)
+                                        return;
 			}
 
 			if (config.CookieLess)
@@ -127,7 +130,7 @@ namespace System.Web.SessionState
 				context.Request.SetHeader (HeaderName, id);
 				context.Response.Redirect (UrlUtils.InsertSessionId (id,
 						context.Request.FilePath));
-			} else {
+			} else if (isNew) {
 				string id = context.Session.SessionID;
 				HttpCookie cookie = new HttpCookie (CookieName, id);
 				cookie.Path = UrlUtils.GetDirectory (context.Request.Path);