Closed
Description
The follow code
uriTemplate, err := template.New("{+baseurl}/reports/getActiveUserDetail(period='{period}')")
fails with the error
errors.errorString{s:"uritemplate:72:invalid literals"}
according to
If the literal character is allowed anywhere in the URI syntax (unreserved / reserved / pct-encoded ), then it is copied directly to the result string.
https://datatracker.ietf.org/doc/html/rfc6570#section-3.1
single quote being a reserved literal in the URI spec, it should be copied as is (and therefore accepted).
After testing the sample template with a dotnet equivalent library and a java equivalent library parses the template properly.
Removing the quotes from the template also results in a successful parsing.
I believe an entry should be added here, but before I submitted any pull request I wanted to get a confirmation on the analysis.
Line 42 in fa7d6df
Metadata
Assignees
Labels
No labels