diff --git a/src/Pluf/Middleware/Csrf.php b/src/Pluf/Middleware/Csrf.php index a898d42..ea166b2 100644 --- a/src/Pluf/Middleware/Csrf.php +++ b/src/Pluf/Middleware/Csrf.php @@ -92,6 +92,9 @@ class Pluf_Middleware_Csrf // no session, nothing to do return $response; } + if (!isset($response->headers['Content-Type'])) { + return $response; + } try { $data = Pluf_Middleware_Session::_decodeData($request->COOKIE[$cookie_name]); } catch (Exception $e) {