Skip to content

Commit

Permalink
Merge pull request square#30 from square/pat/no403
Browse files Browse the repository at this point in the history
Stop treating 403s like 401s.
  • Loading branch information
JakeWharton committed May 22, 2012
2 parents 5bbf120 + e278a72 commit 28ed543
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions http/src/main/java/retrofit/http/CallbackResponseHandler.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Copyright 2010 Square, Inc.
package retrofit.http;

import com.google.gson.Gson;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

import com.google.gson.Gson;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
Expand All @@ -25,7 +24,6 @@ public abstract class CallbackResponseHandler<T>
Logger.getLogger(CallbackResponseHandler.class.getName());

private static final int UNAUTHORIZED = 401;
private static final int FORBIDDEN = 403;
private static final int BAD_GATEWAY = 502;
private static final int GATEWAY_TIMEOUT = 504;

Expand Down Expand Up @@ -71,12 +69,6 @@ public Void handleResponse(HttpResponse response) throws IOException {
return null;
}

if (statusCode == FORBIDDEN) {
LOGGER.fine("Account disabled.");
callback.sessionExpired();
return null;
}

HttpEntity entity = response.getEntity();

// 2XX == successful request
Expand Down

0 comments on commit 28ed543

Please sign in to comment.