diff --git a/src/http/StatelessApplication.php b/src/http/StatelessApplication.php index 6028cc2f..2293e60a 100644 --- a/src/http/StatelessApplication.php +++ b/src/http/StatelessApplication.php @@ -420,14 +420,10 @@ protected function reset(ServerRequestInterface $request): void $this->response->cookieValidationKey = $this->request->cookieValidationKey; $this->response->enableCookieValidation = $this->request->enableCookieValidation; - // reset the session to ensure a clean state - $this->session->close(); + // if a session cookie is present, set the session ID accordingly $sessionId = $this->request->getCookies()->get($this->session->getName())->value ?? ''; $this->session->setId($sessionId); - // start the session with the correct 'ID' - $this->session->open(); - $this->bootstrap(); $this->session->close();