Skip to content

Properly deal with the instance name being empty#28

Merged
EdSchouten merged 3 commits into
mainfrom
eschouten/20260610-instance-name
Jun 10, 2026
Merged

Properly deal with the instance name being empty#28
EdSchouten merged 3 commits into
mainfrom
eschouten/20260610-instance-name

Conversation

@EdSchouten

Copy link
Copy Markdown
Member

Up to this point we didn't attempt to add any structure to instance names, for the reason that REv2's format has some warts, like requiring us to keep certain keywords reserved. Let's come up with a more sensible format. While there, fix the issue that using the empty instance name would result in incorrect bonanza_browser URLs.

Fixes: #26
Fixes: #27

Right now it accepts any string. I don't think we should support exactly
the same format as REv2, but it would be a good idea to have some
restrictions on it, so that it's at least permitted to embed them into
file system pathnames.
We want them to be path-like, similar to what REv2 has. However, we
don't want the format to be as liberal. Though at the same time we don't
want to go the REv2 approach where we need to have a hardcoded list of
forbidden words.
Let's add a utility function to InstanceName to return its value in a
form that is safe to embed in URLs. All forward slashes are replaced
with %2F. Because "-" is currently a reserved character, we can use that
to indicate that the instance name is empty.

Fixes: #26
Fixes: #27
@EdSchouten
EdSchouten force-pushed the eschouten/20260610-instance-name branch from 84ba4ad to f3a78aa Compare June 10, 2026 12:36
@EdSchouten
EdSchouten merged commit c843126 into main Jun 10, 2026
3 checks passed
@EdSchouten
EdSchouten deleted the eschouten/20260610-instance-name branch June 10, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant