File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
client/src/test/java/org/asynchttpclient/uri Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,19 @@ public void testRelativeUriWithConsecutiveDotsFromLevel3Resource() {
228228 assertNull (url .getQuery ());
229229 }
230230
231+ @ Test
232+ public void testRelativeUriWithNoScheme () {
233+ Uri context = Uri .create ("https://hello.com/level1" );
234+
235+ Uri url = Uri .create (context , "//world.org/content/img.png" );
236+
237+ assertEquals (url .getScheme (), "https" );
238+ assertEquals (url .getHost (), "world.org" );
239+ assertEquals (url .getPort (), -1 );
240+ assertEquals (url .getPath (), "/content/img.png" );
241+ assertNull (url .getQuery ());
242+ }
243+
231244 @ Test
232245 public void testCreateAndToUrl () {
233246 String url = "https://hello.com/level1/level2/level3" ;
You can’t perform that action at this time.
0 commit comments