Skip to content

Allow host:port to accept connection url format #16

@vlcinsky

Description

@vlcinsky

Currently the specification of host and port must be in form "{host}:{port}".

In many cases the url to check is already present in the system configuration in form of connection parameter, e.g.: postgres://username:password@hostname:5432/database.

However, current implementation does not seem to accept such host and port specification.

Proposed solution:

  • require presence of explicit host and port in the url
  • rsplit the url on colon :
    • hostname: take the left part: rsplit on / or @, take the last element
    • port: take the right part, split on /, take the first element. Check that it includes only digits.

There are very likely better options, I just wanted to express that to me it seems very acceptable to require explicit hostname and port presence to keep the implementation small and simple.

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