properly use the URL when we have a custom socket factory