Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1443

unable to resolve URI with complex host

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0, 2.1.2
    • Component/s: jclouds-core
    • Labels:
    • Flags:
      Patch

      Description

      We need to be sure that the base URL in this method is ending with a `/`. If not, the final URL will be wrong formatted.

      Example:

      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
      
        }
      }
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tormath1 Mathieu Tortuyaux
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified