Skip Menu |

This queue is for tickets about the URI-Template CPAN distribution.

Report information
The Basics
Id: 108832
Status: resolved
Priority: 0/
Queue: URI-Template

People
Owner: Nobody in particular
Requestors: Glen.Van_Ginkel [...] nanoporetech.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: path separator connot be specified as safe
Date: Thu, 12 Nov 2015 17:33:38 +0000
To: "bug-URI-Template [...] rt.cpan.org" <bug-URI-Template [...] rt.cpan.org>
From: Glen Van Ginkel <Glen.Van_Ginkel [...] nanoporetech.com>
Hi, I'm trying to replace the following url template /{foo}/{+bar} With the values foo => 'first', bar => 'second/third/fourth.html' and I cannot find a way of preventing Template from creating the following result /first/second%252Fthird%252Ffourth.html What am I doing wrong? Regards, Glen
What version of URI::Template are you using? With the latest version and the following script: use strict; use warnings; use URI::Template; my $u = URI::Template->new( '/{foo}/{+bar}' ); print $u->process( foo => 'first', bar => 'second/third/fourth.html' ); I get the output: /first/second/third/fourth.html Which seems to be what you want. -Brian On Thu Nov 12 13:33:51 2015, Glen.Van_Ginkel@nanoporetech.com wrote: Show quoted text
> Hi, > > I'm trying to replace the following url template > > /{foo}/{+bar} > > With the values > > foo => 'first', > bar => 'second/third/fourth.html' > > and I cannot find a way of preventing Template from creating the > following result > > /first/second%252Fthird%252Ffourth.html > > What am I doing wrong? > > Regards, > > Glen
Subject: RE: [rt.cpan.org #108832] path separator connot be specified as safe
Date: Fri, 13 Nov 2015 10:08:32 +0000
To: "bug-URI-Template [...] rt.cpan.org" <bug-URI-Template [...] rt.cpan.org>
From: Glen Van Ginkel <Glen.Van_Ginkel [...] nanoporetech.com>
Hi Brian, I used your code snippet to validate the part of code where I noticed this behaviour. It proved that URI::Template (v0.22) is perfectly fine and indeed helped me track down a string manipulation earlier in the procedure that was messing things up. Thanks for the rapid response and apologies for the non-bug (I couldn't find a forum). Kind regards, Glen Show quoted text
-----Original Message----- From: Brian Cassidy via RT [mailto:bug-URI-Template@rt.cpan.org] Sent: 12 November 2015 17:53 To: Glen Van Ginkel Subject: [rt.cpan.org #108832] path separator connot be specified as safe <URL: https://rt.cpan.org/Ticket/Display.html?id=108832 > What version of URI::Template are you using? With the latest version and the following script: use strict; use warnings; use URI::Template; my $u = URI::Template->new( '/{foo}/{+bar}' ); print $u->process( foo => 'first', bar => 'second/third/fourth.html' ); I get the output: /first/second/third/fourth.html Which seems to be what you want. -Brian On Thu Nov 12 13:33:51 2015, Glen.Van_Ginkel@nanoporetech.com wrote:
> Hi, > > I'm trying to replace the following url template > > /{foo}/{+bar} > > With the values > > foo => 'first', > bar => 'second/third/fourth.html' > > and I cannot find a way of preventing Template from creating the > following result > > /first/second%252Fthird%252Ffourth.html > > What am I doing wrong? > > Regards, > > Glen
No problem! :) Cheers, -Brian On Fri Nov 13 06:08:55 2015, Glen.Van_Ginkel@nanoporetech.com wrote: Show quoted text
> Hi Brian, > > I used your code snippet to validate the part of code where I noticed > this behaviour. It proved that URI::Template (v0.22) is perfectly fine > and indeed helped me track down a string manipulation earlier in the > procedure that was messing things up. > > Thanks for the rapid response and apologies for the non-bug (I > couldn't find a forum). > > Kind regards, > > Glen > > > > -----Original Message----- > From: Brian Cassidy via RT [mailto:bug-URI-Template@rt.cpan.org] > Sent: 12 November 2015 17:53 > To: Glen Van Ginkel > Subject: [rt.cpan.org #108832] path separator connot be specified as > safe > > <URL: https://rt.cpan.org/Ticket/Display.html?id=108832 > > > What version of URI::Template are you using? > > With the latest version and the following script: > > use strict; > use warnings; > use URI::Template; > > my $u = URI::Template->new( '/{foo}/{+bar}' ); print $u->process( > foo => 'first', > bar => 'second/third/fourth.html' > ); > > I get the output: > > /first/second/third/fourth.html > > Which seems to be what you want. > > -Brian > > On Thu Nov 12 13:33:51 2015, Glen.Van_Ginkel@nanoporetech.com wrote:
> > Hi, > > > > I'm trying to replace the following url template > > > > /{foo}/{+bar} > > > > With the values > > > > foo => 'first', > > bar => 'second/third/fourth.html' > > > > and I cannot find a way of preventing Template from creating the > > following result > > > > /first/second%252Fthird%252Ffourth.html > > > > What am I doing wrong? > > > > Regards, > > > > Glen
> > >