multiformats / js-uri-to-multiaddr

Convert a URI to a Multiaddr: https://protocol.ai -> /dns4/protocol.ai/tcp/443/https
Other
3 stars 4 forks source link

Warn user when URI has a path component #47

Open Hugo-Trentesaux opened 7 months ago

Hugo-Trentesaux commented 7 months ago

I did some simple test to understand better multiaddr format:

> uriToMultiaddr('wss://example.com:443/foo')
Multiaddr(/dns4/example.com/tcp/443/wss)

It is ignoring silently the foo component of the URI. It would be nice to throw an error or at least warn the user that it is ignored.