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

unable to resolve URI with complex host

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.2.0, 2.1.2
    • jclouds-core
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

                Slack

                  Issue deployment