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

Trailing slash on URL leads to connection errors #1545

Open
philpennock opened this issue Dec 29, 2023 · 1 comment
Open

Trailing slash on URL leads to connection errors #1545

philpennock opened this issue Dec 29, 2023 · 1 comment
Labels
defect Suspected defect such as a bug or regression

Comments

@philpennock
Copy link
Member

Observed behavior

Given a hostname example.org, running:

nats -s tls://example.org server info

succeeds, but

nats -s tls://example.org/ server info

fails; if the hostname points to a single server, I get an error like:

nats: error: nats: no servers available for connection

but if the hostname points to a cluster, I get an error like:

nats: error: dial tcp 192.0.2.1:0: i/o timeout

Expected behavior

Either of two results:

  1. The trailing slash on the URL after the hostname is irrelevant, and connection succeeds and is identical
  2. The trailing slask on the URL immediately yields a parse error for being an invalid URL format

Server and client version

% nats --version
0.1.1-109-g7226b46

Multiple server versions observed with this.

The client version corresponds to a commit made yesterday, 2023-12-28.

Host environment

No response

Steps to reproduce

No response

@philpennock philpennock added the defect Suspected defect such as a bug or regression label Dec 29, 2023
@ripienaar
Copy link
Contributor

I think this one is for nats.go not natscli

@ripienaar ripienaar transferred this issue from nats-io/natscli Feb 5, 2024
@piotrpio piotrpio self-assigned this Feb 5, 2024
@piotrpio piotrpio removed their assignment Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

3 participants