-
Notifications
You must be signed in to change notification settings - Fork 87
Preserve code 104 for backward compatability #85
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
Comments
This is similar to multiformats/multicodec#93. Note: Multiaddr is for addressing endpoints not content. |
I suggest reserving all of 97–122 (lowercase ASCII letters) and 65 – 90 (uppercase ASCII letters), since an URIs, and by extension also URLs, scheme may start with any of these characters (RFC 3986#3.1). Additionally 47 (ASCII forward-slash) should be reserved since that's how text-encoded multiaddrs start. This way it should be possible to non-ambiguously determine whether the given string is an URI/URL, binary multiaddress or text multiaddress.
Yes, but I know plenty of applications that use |
Sorry, I'm a little lost on endpoint v content. Can someone explain? But yes, in general I agree that preserving all ascii letter codes would be a good step |
I'll try to explain using the IPFS HTTP API as an example: When you want to do a request (such as So what is it referring to? While often times when starting standalone HTTP applications, the base will be Note that in all of this we only referred to the specific resource we wanted to interact with (the Hopefully that makes it clearer what the HTTP paths are, and aren't, referring to in the context of MultiAddr. |
Got it, that makes sense. |
Unfortunately, we can't do that. We only have 128 single-byte multicodecs available (and are already using some of those codes). 0x47 is multiformats/multicodec#93 (which I completely agree with). At the end of the day, I'm not convinced trying to disambiguate between multiaddr and URLs is useful. Users should use one or the other or disambiguate themselves.
Yep, I agree. I was just trying to get everyone on the same page. OP asked about EIP and HTTP so I assumed the use-case was content in web-browsers. This came up when Swarm tried to use multiaddrs with EIP: #73. In the end, they we went with a new thing entirely: a multicodec prefixed path (multiformats/multicodec#104). This is actually a problem with how we currently specify the "http" protocol. For example, the unix protocol actually accepts a path. Unfortunately, this means it has to be a terminal protocol because it ends up consuming the rest of the path I see you've found the discussion here: #63 |
@Stebalien: So I guess this can be closed as WONTFIX, with the conclusion that disambiguating between binary multipaths and URL locators is an application-level affair, then? |
I would say so too. If you're in a context where you could actually confuse URLs and multiaddrs, make the multiaddrs into URIs a la Or work with the string representation which will always start in |
104 is the ascii letter for
h
, which will be the first letter in http and https urls.I've been suggesting the use of multiaddr in EIPs, but they've mostly been rejected. The reason given is that multiaddr is not "stable". Of course, mutliaddr will probably never be truly stable, but thats a discussion for another day.
All that said, preserving 104 would allow for wider multiaddr use in protocols which currently only allow for http and https urls
The text was updated successfully, but these errors were encountered: