mirror of https://github.com/apache/jclouds.git
fixed double-slash in path
git-svn-id: http://jclouds.googlecode.com/svn/trunk@2002 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
050f6e9a82
commit
7171f2c431
|
@ -70,8 +70,10 @@ public class ParseURIFromListOrLocationHeaderIf20x implements Function<HttpRespo
|
||||||
if (locationUri.getHost() != null)
|
if (locationUri.getHost() != null)
|
||||||
return locationUri;
|
return locationUri;
|
||||||
checkState(request != null, "request should have been initialized");
|
checkState(request != null, "request should have been initialized");
|
||||||
|
if (!location.startsWith("/"))
|
||||||
UriBuilder builder = UriBuilder.fromUri(URI.create("http://localhost/"+locationUri));
|
location = "/" + location;
|
||||||
|
UriBuilder builder = UriBuilder.fromUri(URI.create("http://localhost"
|
||||||
|
+ locationUri.getPath()));
|
||||||
builder.host(request.getEndpoint().getHost());
|
builder.host(request.getEndpoint().getHost());
|
||||||
builder.port(request.getEndpoint().getPort());
|
builder.port(request.getEndpoint().getPort());
|
||||||
builder.scheme(request.getEndpoint().getScheme());
|
builder.scheme(request.getEndpoint().getScheme());
|
||||||
|
|
Loading…
Reference in New Issue