Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If the last token in a URI contains a full stop, attempts to use as MIME type and so breaks #12

Open
tomchiverton opened this issue Feb 24, 2016 · 0 comments

Comments

@tomchiverton
Copy link
Contributor

For instance, a taffy_uri of /addressbook/check/add/{email} will be called with /addressbook/check/add/[email protected]. Taffy things '.com' is a MIME type hint (like '.json') and strips it from the arguments, and also then returns 404 because the CFC has no 'asCom' method.

This seems to be done by buildRequestArguments():897 which checks cfif local.numTokenValues gt local.numTokenNames><!--- when there is 1 more token value than name, that value (regex capture group) is the format --->

Maybe the extracted value should be checked against application._taffy.settings.mimeExtensions and not added if not found ? But that still creates an issue where a user may legitimately want to pass something.json as an argument (such as in a file browser).

Maybe some way to turn of the feature of getting MIME hints this way is needed instead ?

There is a work around using regular expressions in the taffy_uri ({email:.+}).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant