Skip to content

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

Description

@mattbnz

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions