SENTRY-422: The URI object handling needs to be more robust (Colin Ma via Lenni Kuff)