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

Bug on parsing DID URLs with a path and fragment #14

Open
stevenvegt opened this issue Apr 6, 2021 · 0 comments
Open

Bug on parsing DID URLs with a path and fragment #14

stevenvegt opened this issue Apr 6, 2021 · 0 comments

Comments

@stevenvegt
Copy link

stevenvegt commented Apr 6, 2021

Expect this to succeed:

t.Run("ok - parse a DID URL", func(t *testing.T) {
    id, err := ParseDID("did:nuts:123/path#fragment")
    assert.NoError(t, err)
    assert.Equal(t, "did:nuts:123/path#fragment", id.String())
})

Get this instead:

=== RUN   TestParseDIDURL/ok_-_parse_a_DID_URL
    did_test.go:86: 
        	Error Trace:	did_test.go:86
        	Error:      	Received unexpected error:
        	            	character is not allowed in path
        	Test:       	TestParseDIDURL/ok_-_parse_a_DID_URL

It seems that this fails when there is a path present, but no query between path and the fragment.

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

1 participant