From 64175a1cddb3628eab47be7990771e6bc0027b70 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 22 Dec 2015 16:12:05 +0300 Subject: fix twitter redirects --- src/main/java/com/juick/http/www/TwitterAuth.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/juick/http/www') diff --git a/src/main/java/com/juick/http/www/TwitterAuth.java b/src/main/java/com/juick/http/www/TwitterAuth.java index ac44bd86..b51cbf5e 100644 --- a/src/main/java/com/juick/http/www/TwitterAuth.java +++ b/src/main/java/com/juick/http/www/TwitterAuth.java @@ -62,7 +62,7 @@ public class TwitterAuth { String authUrl = oAuthService.getAuthorizationUrl(requestToken); response.addCookie(new Cookie("request_token", requestToken.getToken())); response.addCookie(new Cookie("request_token_secret", requestToken.getSecret())); - response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY); + response.setStatus(HttpServletResponse.SC_FOUND); response.setHeader("Location", authUrl); } else { if (verifier != null && verifier.length() > 0) { @@ -73,7 +73,7 @@ public class TwitterAuth { JSONObject jsonResponse = new JSONObject(oAuthRequest.send().getBody()); String screenName = jsonResponse.getString("screen_name"); if (UserQueries.linkTwitterAccount(sql, user, accessToken.getToken(), accessToken.getSecret(), screenName)) { - response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY); + response.setStatus(HttpServletResponse.SC_FOUND); response.setHeader("Location", "http://juick.com/settings"); } else { response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); -- cgit v1.2.3