Skip to content
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 emails.

Already on GitHub? Sign in to your account

absolute URIs should not include a port component when the port matches the scheme default #457

Open
mattbnz opened this issue Feb 12, 2024 · 0 comments

Comments

@mattbnz
Copy link

mattbnz commented Feb 12, 2024

In certain circumstances (e.g. proxy configured, HTTP URI being requested), httpclient will enforce the output of an "absolute" URI for the request -

The logic for generating an absolute URI unconditionally includes the port number, even when it matches the default port number of the scheme in the URI. This behaviour is contrary to https://www.rfc-editor.org/rfc/rfc3986#section-3.2.3 which states the port should be omitted when it matches the default.

master...mkmba-nz:httpclient:omit_default_port is an example of a simple patch that fixes this issue and updates httpclient to the RFC-compliant behaviour.

Is there any hope/interest in merging such a PR to this library?

I see there have been no releases for many years, so raising this issue to discuss before spending more time on the PR, I am happy to clean it up and add tests, etc if there would be interest in merging it.

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

No branches or pull requests

1 participant