On 17/03/2017 12:12, Akka Team wrote:
Did you read the docs about the various path directives and how they differ? http://doc.akka.io/docs/akka-http/10.0.4/scala/http/routing-dsl/directives/path-directives/index.html
Yes, over and over, because as I said I was sure I must be missing something.
I actually think it might be a bug - I'm in the middle of trying to figure out exactly where but it looks like the URI handling under the DSL splits the URI into segments and then matches the routing directives against it in turn. In the case of a string it looks like it is comparing the string to the path segment with startsWith instead of equals, so it is checking if string is a _prefix_ of the next segment rather than the _entirety_ of the next path segment.
If someone wanted to match the next segment against a string prefix then they could use a RE, e.g. "foo(.*)".r would match "foobar", "foobaz" etc and extract "bar" and "baz".
Currently a string of "foo" will *also* match "foobar", "foobaz" but won't extract the "bar" or "baz" suffix, which seems almost certainly not what you'd want.
-- Alan Burlison -- --
--- You received this message because you are subscribed to the Google Groups "Akka User List" group.Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
