aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/http/www
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2015-12-22 16:12:05 +0300
committerGravatar Vitaly Takmazov2015-12-22 16:12:05 +0300
commit64175a1cddb3628eab47be7990771e6bc0027b70 (patch)
treeb2e30613bee0e15ce7cbb88b8d121cfac8cdb715 /src/main/java/com/juick/http/www
parent943b0e3875de3b99480115b6c28d7b113692c5cb (diff)
fix twitter redirects
Diffstat (limited to 'src/main/java/com/juick/http/www')
-rw-r--r--src/main/java/com/juick/http/www/TwitterAuth.java4
1 files changed, 2 insertions, 2 deletions
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);