entity was missing on redirect

git-svn-id: http://jclouds.googlecode.com/svn/trunk@1643 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-07-18 14:49:34 +00:00
parent 1e56bb6eea
commit 205a929526
1 changed files with 2 additions and 0 deletions

View File

@ -110,7 +110,9 @@ public class TransformingHttpCommandImpl<T> implements TransformingHttpCommand<T
UriBuilder builder = UriBuilder.fromUri(request.getEndpoint());
builder.host(host);
builder.port(port);
Object oldEntity = request.getEntity();
request = new HttpRequest(request.getMethod(), builder.build(), request.getHeaders());
request.setEntity(oldEntity);
request.getHeaders().replaceValues(HttpHeaders.HOST, Collections.singletonList(host));
return request;
}