8000 url: track whether url explicitly specified a port by ethomson · Pull Request #6851 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

url: track whether url explicitly specified a port #6851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related em 8000 ails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2024
Merged

Conversation

ethomson
Copy link
Member

When parsing URLs, track whether the port number was explicitly specified or not. We track this separately from whether the port is the default port. This is so that we can discern between URLs that have the default port explicitly specified or not.

For example: scp://host:22/foo and scp://host/foo are equivalent in terms of functionality, but are not semantically equivalent.

A user might wish to specify scp://host:22/foo in order to explicitly ensure that we connect on port 22, which might override (for example) a different configuration option.

When parsing URLs, track whether the port number was explicitly
specified or not. We track this separately from whether the port is the
_default_ port. This is so that we can discern between URLs that have
the default port explicitly specified or not.

For example: scp://host:22/foo and scp://host/foo are equivalent in
terms of functionality, but are not semantically equivalent.

A user might wish to specify scp://host:22/foo in order to explicitly
ensure that we connect on port 22, which might override (for example) a
different configuration option.
@ethomson ethomson merged commit 2ecc858 into main Jul 13, 2024
19 checks passed
@ethomson ethomson deleted the ethomson/url_ports branch July 13, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0