-
Notifications
You must be signed in to change notification settings - Fork 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
Define /http-path
#164
Define /http-path
#164
Conversation
Out of curiosity, knowing I've probably missed something in the doc which explicitly states this which I didn't understand among the RFC links, are the paths strictly ASCII characters (with punycode needed for UTF-8 conversion), or is encoding the paths as UTF-8 allowed? |
Good question. Section 2 of RFC 3986 covers this. Basically it depends on the context. If the context/protocol is UTF-8, then this is UTF-8. In practice I think the string encoding of this will be UTF-8. |
I think as is, my document is ambiguous. Only the following characters are not percent-encoded: I was trying to avoid the ABNF notation from the RFC, but I might have to include it. |
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
It's an aesthetic point but I wonder if it could be It also opens the door for other modifiers that might be required to create a valid request touched on in #63, such as |
|
Is a multiaddr with If not the spec should say so. If so, it should say how to infer a |
Yes. There's an example in the spec with just a
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
One thing that occurs is that implementations tend to omit the Peer ID from Multiaddrs that are part of PeerInfo objects.
This new segment must be after the Peer ID so these implementations would have to start including the Peer ID which would increase the size of signed peer records, the amount of data transferred during network queries, etc.
I don't expect this component to be present in multiaddrs that a peer shares for connectivity as in Peer Routing Records. Only in cases where you want to reference a specific HTTP resource. I think DNS records are a good analogy. For example, An |
See definition in: multiformats/multiaddr#164
Adds a protocol note for how to encode paths to Unix domain sockets as strings, that may include the delimiting character of `/`. This allows us to append other tuples to the multiaddr while also ensuring we can round-trip the address to a string and back. This doesn't affect the binary representation of the multiaddr since everything is length-delimited. Takes inspiration from #164 and proposes using URI encoding for the segment, the same as the `/http-path` component. One difference is if the path is to represent the filesystem root, it must be included in the value portion of the tuple, otherwise it can be omitted.
Summary
Adds a new multiaddr component for
/http-path
, and define it.I think this follows RFC 3986's notion of "Path" (section 3.3). Please correct me if I'm wrong.
I'm using
http-path
instead ofhttpath
(used by IPNI) previously for two reasons:Before Merge