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
This commit is contained in:
gwoo 2009-06-01 16:52:05 +00:00
parent 9aa64ef564
commit 2842fe7021
2 changed files with 12 additions and 4 deletions

View file

@ -138,10 +138,8 @@ class CakeSession extends Object {
if ($start === true) {
$this->host = env('HTTP_HOST');
if (empty($base) || strpos($base, '?') === 0 || strpos($base, 'index.php') === 0) {
$this->path = '/';
} else {
$this->path = '/';
if (strpos($base, '?') === false && strpos($base, 'index.php') === false) {
$this->path = $base;
}

View file

@ -67,6 +67,16 @@ class SessionTest extends CakeTestCase {
$this->Session->start();
$this->Session->_checkValid();
}
/**
* testSessionPath
*
* @access public
* @return void
*/
function testSessionPath() {
$Session = new CakeSession('/index.php');
$this->assertEqual('/', $Session->path);
}
/**
* testCheck method
*