Avoid IllegalStateException in case of abort concurrent to header
generation.
434578 - Complete listener not called if redirected to an invalid URI.

Fixed by catching the exception and failing properly the redirect.