Skip to content

Improve tolerance of :uri parsing to connect #134

@reify-james-vickers

Description

@reify-james-vickers

Currently protojure.grpc.client.providers.http2/connect requires a very specific format for :uri and does not accept some that it perhaps could. The URI's it seems to accept have scheme as well as port number, e.g. http://localhost:8080. Any piece missing makes the parsing fail, sometimes with a relatively opaque exception. It would be helpful for instance to support formats like:

  • http://some-host or https://some-host, using the default port numbers for these protocols (i.e. 80 for http and 443 for https)
    • Currently omitting the port number causes an exception: (NumberFormatException) at java.lang.Integer/parseInt (Integer.java:614): null
  • some-host.com or similar URI's that omit the connection protocol; not clear if it's really necessary to have the protocol or if it can default to something like https or correspond to what :ssl is defined/provided as.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions