Skip to content
This repository
Browse code

fixes #6401, Session path on IIS

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8183 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
commit 2842fe702167f8150c6dd77976759352326cd180 1 parent 9aa64ef
authored June 01, 2009
6  cake/libs/session.php
@@ -138,10 +138,8 @@ function __construct($base = null, $start = true) {
138 138
 
139 139
 		if ($start === true) {
140 140
 			$this->host = env('HTTP_HOST');
141  
-
142  
-			if (empty($base) || strpos($base, '?') === 0 || strpos($base, 'index.php') === 0) {
143  
-				$this->path = '/';
144  
-			} else {
  141
+			$this->path = '/';
  142
+			if (strpos($base, '?') === false && strpos($base, 'index.php') === false) {
145 143
 				$this->path = $base;
146 144
 			}
147 145
 
10  cake/tests/cases/libs/session.test.php
@@ -68,6 +68,16 @@ function setUp() {
68 68
 		$this->Session->_checkValid();
69 69
 	}
70 70
 /**
  71
+ * testSessionPath
  72
+ *
  73
+ * @access public
  74
+ * @return void
  75
+ */
  76
+	function testSessionPath() {
  77
+		$Session = new CakeSession('/index.php');
  78
+		$this->assertEqual('/', $Session->path);
  79
+	}
  80
+/**
71 81
  * testCheck method
72 82
  *
73 83
  * @access public

0 notes on commit 2842fe7

Please sign in to comment.
Something went wrong with that request. Please try again.