Can we not always parse this as a URI and then strip the details out (as we do in aor_from_uri)?  That seems clearer.