8000 UriTemplate.expand does not properly escape characters for path-style parameter expansion · Issue #351 · googleapis/google-http-java-client · GitHub
[go: up one dir, main page]

Skip to content
UriTemplate.expand does not properly escape characters for path-style parameter expansion #351
Closed
@kilink

Description

@kilink

UriTemplate.expand does not properly escape reserved characters in values for path-style parameter expansion (e.g., templates of the form "{;foo}").

See the relevant section of RFC6570, which reads to me as indicating that reserved characters in values should be escaped. For comparison, the Python uritemplate package does escape reserved characters such as semicolons in this case.

Example code:

String url = UriTemplate.expand("http://example.com/index.html", "{;foo}",
            ImmutableMap.of("foo", "bar;xyz") ,false);
// url == http://example.com/index.html;foo=bar;xyz
// expected == http://example.com/index.html;foo=bar%3Bxyz

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0