Handle secure versions of protocols in DefaultSocket when changing URLs.