[
https://issues.apache.org/jira/browse/JCLOUDS-1443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16590650#comment-16590650
]
ASF subversion and git services commented on JCLOUDS-1443:
----------------------------------------------------------
Commit 591fe84dd923cdf189d3da5362ccaa4128e8935a in jclouds's branch
refs/heads/2.1.x from [~tormath1]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=591fe84 ]
JCLOUDS-1443: fix(rest/processor): check if `/` is ending a default endpoint
> unable to resolve URI with complex host
> ---------------------------------------
>
> Key: JCLOUDS-1443
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1443
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-core
> Reporter: Mathieu Tortuyaux
> Priority: Minor
> Labels: easyfix
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> We need to be sure that the base URL in this [method|
> https://github.com/tormath1/jclouds/blob/master/core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java#L576]
> is ending with a `/`. If not, the final URL will be wrong formatted.
> Example:
> {code:java}
> public class Toto {
> public static void main(String []argv) throws Exception {
> URI uri1 = URI.create("https://www.googleapis.com/compute/v1");
> URI uri2 =
> URI.create("projects/a-project/regions/us-east1/subnetworks/toto");
> URI uri3 = URI.create("https://www.googleapis.com/compute/v1/");
> System.out.println(uri1.resolve(uri2));
> // output:
> https://www.googleapis.com/compute/projects/a-project/regions/us-east1/subnetworks/toto
> System.out.println(uri3.resolve(uri2));
> // output:
> https://www.googleapis.com/compute/v1/projects/a-project/regions/us-east1/subnetworks/toto
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)