URL output = input;
if (output.isHierarchical()) {
output = output
.withUsername(decodeUnreserved(output.username()))
.withPassword(decodeUnreserved(output.password()))
.withPath(decodeUnreserved(output.path()));
}
return output
.withQuery(decodeUnreserved(output.query()))
.withFragment(decodeUnreserved(output.fragment()));
}