mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
9aa64ef564
commit
2842fe7021
2 changed files with 12 additions and 4 deletions
|
@ -138,10 +138,8 @@ class CakeSession extends Object {
|
||||||
|
|
||||||
if ($start === true) {
|
if ($start === true) {
|
||||||
$this->host = env('HTTP_HOST');
|
$this->host = env('HTTP_HOST');
|
||||||
|
$this->path = '/';
|
||||||
if (empty($base) || strpos($base, '?') === 0 || strpos($base, 'index.php') === 0) {
|
if (strpos($base, '?') === false && strpos($base, 'index.php') === false) {
|
||||||
$this->path = '/';
|
|
||||||
} else {
|
|
||||||
$this->path = $base;
|
$this->path = $base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,16 @@ class SessionTest extends CakeTestCase {
|
||||||
$this->Session->start();
|
$this->Session->start();
|
||||||
$this->Session->_checkValid();
|
$this->Session->_checkValid();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* testSessionPath
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function testSessionPath() {
|
||||||
|
$Session = new CakeSession('/index.php');
|
||||||
|
$this->assertEqual('/', $Session->path);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* testCheck method
|
* testCheck method
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue