How to go back to referer after login failure?

I solved it. There is solution: How to disable redirection after login_check in Symfony 2 and here is code which solves my problem: <?php namespace Acme\MainBundle\Handler; use Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface; use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RedirectResponse; class AuthenticationHandler implements AuthenticationFailureHandlerInterface, LogoutSuccessHandlerInterface { public function onAuthenticationFailure(Request $request, AuthenticationException $exception) { $referer = $request->headers->get(‘referer’); $request->getSession()->setFlash(‘error’, $exception->getMessage()); return … Read more

Get Referer URL in Spring MVC

In Spring MVC 3 you can get it from request, as @BalusC already said: public ModelAndView doSomething(final HttpServletRequest request) { final String referer = request.getHeader(“referer”); … } but there also exists special annotation @RequestHeader which allow to simplify your code to public ModelAndView doSomething(@RequestHeader(value = “referer”, required = false) final String referer) { … }

Changing the referer URL in python requests

According to http://docs.python-requests.org/en/latest/user/advanced/#session-objects , you should be able to do: s = requests.Session() s.headers.update({‘referer’: my_referer}) s.get(url) Or just: requests.get(url, headers={‘referer’: my_referer}) Your headers dict will be merged with the default/session headers. From the docs: Any dictionaries that you pass to a request method will be merged with the session-level values that are set. The method-level … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)