parameters with period do not work #5

adamsowinski opened this Issue Aug 29, 2011 · 4 comments

5 participants


I have a method like:

* Returns a parameter
* @url POST /parameter/$parameter
public function parameter($parameter = null)
return $parameter;

My request is /parameter/12334556.pdf

From above method I get 12334556 and should be 12334556.pdf

jk commented Aug 30, 2011

jacwrights repository has a bug which causes this. Take a look to some of the forks which fixed it, but most of the forks now use the .extension to alter the output format. Since .pdf isn't supported this will not get you any relief here.

Perhaps we can add handing over extensions to the variables if they aren't supported output formats, but this will be confusing more than it helps IMO.

@jacwright jacwright added the Bug label Feb 17, 2014

Isn't removing period afterwards the desired behaviour? @jacwright

In getPath method:

// remove trailing format definition, like /controller/action.json -> /controller/action
$path = preg_replace('/\.(\w+)$/i', '', $path);

For me, it removed .com from the end of the email string. I just appended .something after and got the whole email address


This could be something where we remove the period for matching the action, but include it for the action arguments as described in the situation above. If someone would like to contribute a fix back that can handle both situations I would be happy to merge it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment