Skip to content

(.:format) parsing ignoring multiple periods in last parameter #23

@adamlwatson

Description

@adamlwatson

Hi Josh,

I am working with http_router within a Goliath 0.9.4 project. I have a route with a variable path segment at the end, of which the value can contain multiple periods. If I add in the (.:format) specifier, then everything following the first period in the value of this path segment is truncated.

For example, if I specify my route as such:

get '/foo/:bar(.:format)'

...and the incoming request looks like this:

http://localhost/foo/baz.bat.json

...then the resulting value I receive for the :bar parameter is just "baz" instead of "baz.bat".

Is there any workaround for this? I'm thinking that the (.:format) specifier should not be parsing out everything following the first period... it should be looking for the last period in the parameter value.

Thanks,
Adam

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