fxa / uritemplate-js

An javascript implementation of RFC6570 Uri Templates
MIT License
97 stars 20 forks source link

Existing pct-encoding in values for reserved {+} or fragment {#} expansion must NOT be re-encoded #17

Open JohnBrinkman opened 8 years ago

JohnBrinkman commented 8 years ago

Expanding: {"uri": "http://foo/bar?message=hello%20world"} with the template: {+uri} must result in: "http://foo/bar?message=hello%20world"

Not:

"http://foo/bar?message=hello%2520world"

From: https://tools.ietf.org/html/rfc6570#section-3.2.1 "Note that the percent character ("%") is only allowed as part of a pct-encoded triplet and only for reserved/fragment expansion: in all other cases, a value character of "%" MUST be pct- encoded as "%25" by variable expansion."

fxa commented 8 years ago

See your point, will fix it as soon as possible

On 15.06.2016 16:36, John Brinkman wrote:

Expanding: {"uri": "http://foo/bar?message=hello%20world"} with the template: {+uri} must result in: "http://foo/bar?message=hello%20world"

Not:

"http://foo/bar?message=hello%2520world"

From: https://tools.ietf.org/html/rfc6570#section-3.2.1 "Note that the percent character ("%") is only allowed as part of a pct-encoded triplet and only for reserved/fragment expansion: in all other cases, a value character of "%" MUST be pct- encoded as "%25" by variable expansion."


You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/fxa/uritemplate-js/issues/17

Franz Antesberger Alexander Ferdinand Str 3 93051 Regensburg info@franz-antesberger.de 0160 374 84 95

fxa commented 8 years ago

And of course i will add your sample to the test suite ;-)

On 15.06.2016 16:36, John Brinkman wrote:

Expanding: {"uri": "http://foo/bar?message=hello%20world"} with the template: {+uri} must result in: "http://foo/bar?message=hello%20world"

Not:

"http://foo/bar?message=hello%2520world"

From: https://tools.ietf.org/html/rfc6570#section-3.2.1 "Note that the percent character ("%") is only allowed as part of a pct-encoded triplet and only for reserved/fragment expansion: in all other cases, a value character of "%" MUST be pct- encoded as "%25" by variable expansion."


You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/fxa/uritemplate-js/issues/17

Franz Antesberger Alexander Ferdinand Str 3 93051 Regensburg info@franz-antesberger.de 0160 374 84 95

JohnBrinkman commented 8 years ago

Excellent. Thank you.