Skip to content

Commit

Permalink
restricted follow redirect to idempotent verbs
Browse files Browse the repository at this point in the history
  • Loading branch information
smartrics committed Dec 6, 2012
1 parent bec0bcb commit a63065e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/smartrics/rest/client/RestClientImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ protected void configureHttpMethod(HttpMethod m, String hostAddr, final RestRequ
addHeaders(m, request);
setUri(m, hostAddr, request);
m.setQueryString(request.getQuery());
m.setFollowRedirects(request.isFollowRedirect());
if (m instanceof EntityEnclosingMethod) {
RequestEntity requestEntity = null;
String fileName = request.getFileName();
Expand Down Expand Up @@ -187,7 +186,10 @@ public String getContentType() {
}
}
((EntityEnclosingMethod) m).setRequestEntity(requestEntity);
} else {
m.setFollowRedirects(request.isFollowRedirect());
}

}

private RequestEntity configureMultipartFileUpload(HttpMethod m, final RestRequest request, RequestEntity requestEntity, String fileName) {
Expand Down

0 comments on commit a63065e

Please sign in to comment.