Skip to content

Commit

Permalink
Merge pull request #116 from tumblr/ceyko/114/avatar-302-response
Browse files Browse the repository at this point in the history
Fix avatar exceptions on 302 redirect responses
  • Loading branch information
ceyko authored Oct 20, 2017
2 parents 2920222 + 776eb3c commit ec8a11a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public String getRedirectUrl(String path) {
HttpURLConnection.setFollowRedirects(false);
Response response = request.send();
HttpURLConnection.setFollowRedirects(presetVal);
if (response.getCode() == 301) {
if (response.getCode() == 301 || response.getCode() == 302) {
return response.getHeader("Location");
} else {
throw new JumblrException(response);
Expand Down

0 comments on commit ec8a11a

Please sign in to comment.