Skip to content

Add support for http-path#246

Merged
MarcoPolo merged 2 commits into
masterfrom
marco/http-path
Jun 13, 2024
Merged

Add support for http-path#246
MarcoPolo merged 2 commits into
masterfrom
marco/http-path

Conversation

@MarcoPolo
Copy link
Copy Markdown
Contributor

@MarcoPolo MarcoPolo requested a review from sukunrt June 5, 2024 16:48
Copy link
Copy Markdown
Member

@sukunrt sukunrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a few examples to the fuzzer here:

var good = []string{

Comment thread multiaddr_test.go
Comment thread multiaddr_test.go
@MarcoPolo
Copy link
Copy Markdown
Contributor Author

good call on the fuzzing. I found a surprising behavior where if a variable sized component has a zero-len value it will not put anything into the multiaddr string. This means that the string /http-path/http is ambigous since it's not clear if it's http-path with no value and an http component, or an http-path with the value "http".

To disambiguate, I've made it a requirement for there to be at least some value in the http-path component. Which seems to be the same thing that other length prefixed sized components do (e.g. dns, p2p). This library should probably make it possible to represent components with a value that has len 0 (e.g. /http-path//http), but nothing currently needs this, so likely not a priority.

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

Successfully merging this pull request may close these issues.

2 participants