From c633f6b67310f9d2c06f3d2dda72848d558795b1 Mon Sep 17 00:00:00 2001 From: Ryan Castle Date: Mon, 18 Aug 2014 10:43:41 +0930 Subject: [PATCH] Improved clarity of explanation around overriding setTargetPath() --- cookbook/security/target_path.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbook/security/target_path.rst b/cookbook/security/target_path.rst index 1c101954bf5..e2055373990 100644 --- a/cookbook/security/target_path.rst +++ b/cookbook/security/target_path.rst @@ -10,9 +10,9 @@ the name of the firewall, defined in ``security.yml``). Upon a successful login, the user is redirected to this path, as to help them continue from the last known page they visited. -On some occasions, this is unexpected. For example when the last request before logout -was an XMLHttpRequest route, the user may be redirected back to an invalid -route. +In some situations, this is not ideal. For example when the last request +URI was an XMLHttpRequest which returned a non-HTML or partial HTML response, +the user is redirected back to a page which the browser cannot render. To get around this behavior, you would simply need to extend the ``ExceptionListener`` class and override the default method named ``setTargetPath()``.