Skip to content

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

@tomchiverton

Description

@tomchiverton

For instance, a taffy_uri of /addressbook/check/add/{email} will be called with /addressbook/check/add/foo@bar.com. 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:.+}).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions