raku-community-modules / URI

Raku realization of URI — Uniform Resource Identifiers handler
Artistic License 2.0
3 stars 14 forks source link

Can't round-trip with URI escape part in path #43

Closed jonathanstowe closed 5 years ago

jonathanstowe commented 5 years ago

It appears that the 4991a618 broke something like this:

perl6 -MURI -e 'say URI.new("http://localhost:5984/_users/org.couchdb.user%3Ayotjfgnr")'
http://localhost:5984/_users/org.couchdb.user%253Ayotjfgnr

The actual code I found this in creates the uri with URI::Template which encodes the path parts as per the https://tools.ietf.org/html/rfc6570

I think that to achieve the intent of the change (properly encode unicode parts,) it will need to un-escape the path parts first before escaping them again.

I'll make the change in a bit.