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

Open
adamlwatson opened this Issue Dec 15, 2011 · 0 comments

Projects

None yet

1 participant

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

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