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

Multiple separators #3

Open
CMCDragonkai opened this issue Feb 26, 2017 · 3 comments
Open

Multiple separators #3

CMCDragonkai opened this issue Feb 26, 2017 · 3 comments

Comments

@CMCDragonkai
Copy link

Hey we're studying this library for a full libp2p implementation.

I have to ask however, is that why did you make it so that it can parse many separators.

The parser accepts /ip4/////////127.0.0.1/////////. I wasn't aware this is a legal multiaddress.

@basile-henry
Copy link
Owner

Hey!

The reference js implementation seems to accept multiple separators as can be seen in the source code. In general I think it is a good behaviour for this kind of library to be a bit looser on the definition when parsing and very strict when generating the address.

I believe http addresses have the same behaviour, try to navigate to https://github.com/basile-henry////hs-multiaddr////////////////issues////////////////3

@CMCDragonkai
Copy link
Author

Thanks for the answer. That's a good idea for human to machine interfaces, but for machine to machine interfaces then I'd prefer strictness and simplicity. But since it's in the go impl, then we'll just go with it. Hopefully this can be defined in the spec.

@basile-henry
Copy link
Owner

Isn't the point of the string representation of a multiaddr to be for human to machine interfaces? The binary encoding is a lot more strict!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants