Skip to content

UrlExt should be simplified to avoid mutating the URL fragment #860

Description

@nothingmuch

The UrlExt trait provides both getters and setters for fragment parameters of the mailbox endpoint URL.

The getters use get_param and setters use set_param, but only the sender needs to parse them, and only the receiver needs to construct a fragment and in doing so does not need intermediate representations of the partial parameters, which the set_param implementation provides.

Therefore it would be simpler for UrlExt to only contain the getters, and for set_param to be replaced with some form of builder pattern based approach, which just accumulates the typed values and then serializes them in one go, removing the complexity of re-parsing and mutating the fragment string.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions