1

I am trying to construct the below URL:

https://console.aws.amazon.com/elasticmapreduce/home?region=us-east-1#cluster-details:j-1IGU6572KT6LB

I am not sure how to include the :j-1IGU6572KT6LB. When I include :`, it gets encoded. Trying to see if that can be avoided.

This is what I have:

    UriBuilder
    .fromPath("console.aws.amazon.com")
    .path("elasticmapreduce")
    .path("home")
    .queryParam("region","us-east-1")
    .fragment("cluster-details")
    .port(-1)
    .scheme("https")
unor
  • 92,415
  • 26
  • 211
  • 360
user2221654
  • 311
  • 1
  • 7
  • 20

1 Answers1

0

If the ":" in fragments is encoded that appears to me to be a bug (see RFC 3986, Section 3.5 and 3.3). I recommend to open a bug report.

OTOH, if a recipient fails to handle the percent-encoded colon, that's a bug as well.

Julian Reschke
  • 40,156
  • 8
  • 95
  • 98