Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

parameters with period do not work #5

Open
adamsowinski opened this Issue · 2 comments

4 participants

@adamsowinski

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
jk commented

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
@ningt

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.