[ https://issues.apache.org/jira/browse/JCLOUDS-1443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ignasi Barrera resolved JCLOUDS-1443. ------------------------------------- Resolution: Fixed > 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 > Fix For: 2.2.0, 2.1.2 > > 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)